diff options
| author | Marc Tiehuis <marctiehuis@gmail.com> | 2018-03-23 20:27:11 +1300 |
|---|---|---|
| committer | Marc Tiehuis <marctiehuis@gmail.com> | 2018-03-23 20:27:11 +1300 |
| commit | 3d1732ef6c8ebc7edf10485f61b4ec905303cd8a (patch) | |
| tree | 04f6cb679eebd178db1ca0eba2652f99c102fe73 /src | |
| parent | 7a99d63c764f3d5d92370c90f932b1bf156269f6 (diff) | |
| download | zig-3d1732ef6c8ebc7edf10485f61b4ec905303cd8a.tar.gz zig-3d1732ef6c8ebc7edf10485f61b4ec905303cd8a.zip | |
Fix OpqaueType usage in exported c functions
We prefer `struct typename`. If a typedef is required, this must be done
manually after generation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index a44091bdbf..de8cfa31ed 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -6592,6 +6592,7 @@ static void get_c_type(CodeGen *g, GenH *gen_h, TypeTableEntry *type_entry, Buf } } case TypeTableEntryIdStruct: + case TypeTableEntryIdOpaque: { buf_init_from_str(out_buf, "struct "); buf_append_buf(out_buf, &type_entry->name); @@ -6609,11 +6610,6 @@ static void get_c_type(CodeGen *g, GenH *gen_h, TypeTableEntry *type_entry, Buf buf_append_buf(out_buf, &type_entry->name); return; } - case TypeTableEntryIdOpaque: - { - buf_init_from_buf(out_buf, &type_entry->name); - return; - } case TypeTableEntryIdArray: { TypeTableEntryArray *array_data = &type_entry->data.array; |
