| ... | @@ -8591,10 +8591,17 @@ static void gen_h_file(CodeGen *g) { | ... | @@ -8591,10 +8591,17 @@ static void gen_h_file(CodeGen *g) { |
| 8591 | Buf return_type_c = BUF_INIT; | 8591 | Buf return_type_c = BUF_INIT; |
| 8592 | get_c_type(g, gen_h, fn_type_id->return_type, &return_type_c); | 8592 | get_c_type(g, gen_h, fn_type_id->return_type, &return_type_c); |
| 8593 | | 8593 | |
| | 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 | } |
| 8594 | buf_appendf(&h_buf, "%s %s %s(", | 8601 | buf_appendf(&h_buf, "%s %s %s(", |
| 8595 | buf_ptr(export_macro), | 8602 | buf_ptr(export_macro), |
| 8596 | buf_ptr(&return_type_c), | 8603 | buf_ptr(&return_type_c), |
| 8597 | buf_ptr(&fn_table_entry->symbol_name)); | 8604 | buf_ptr(symbol_name)); |
| 8598 | | 8605 | |
| 8599 | Buf param_type_c = BUF_INIT; | 8606 | Buf param_type_c = BUF_INIT; |
| 8600 | if (fn_type_id->param_count > 0) { | 8607 | if (fn_type_id->param_count > 0) { |