authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-01 17:51:52-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-01 17:52:17-05:00
log9c47bf68faafc42292f8c8aeb1e1b9e00cfda368
tree5568115bdb432c2a4187550c5a162eac91ce21ae
parentfc17b8ee8bae48b1b4067deee4b38716b935a160
signature Commit is signed but in an unrecognized format.

gen-h: respect @export


1 files changed, 8 insertions(+), 1 deletions(-)

src/codegen.cpp+8-1
......@@ -8591,10 +8591,17 @@ static void gen_h_file(CodeGen *g) {
85918591 Buf return_type_c = BUF_INIT;
85928592 get_c_type(g, gen_h, fn_type_id->return_type, &return_type_c);
85938593
8594 Buf *symbol_name;
8595 if (fn_table_entry->export_list.length == 0) {
8596 symbol_name = &fn_table_entry->symbol_name;
8597 } else {
8598 FnExport *fn_export = &fn_table_entry->export_list.items[0];
8599 symbol_name = &fn_export->name;
8600 }
85948601 buf_appendf(&h_buf, "%s %s %s(",
85958602 buf_ptr(export_macro),
85968603 buf_ptr(&return_type_c),
8597 buf_ptr(&fn_table_entry->symbol_name));
8604 buf_ptr(symbol_name));
85988605
85998606 Buf param_type_c = BUF_INIT;
86008607 if (fn_type_id->param_count > 0) {