diff options
Diffstat (limited to 'decls_cgen.c')
-rw-r--r-- | decls_cgen.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/decls_cgen.c b/decls_cgen.c index 5a85b09..97c63ec 100644 --- a/decls_cgen.c +++ b/decls_cgen.c @@ -277,7 +277,10 @@ static void cgen_fn_decl(CGenerator *g, FnExpr *f, Type *t) { cgen_ctype(g, csub); } } - cgen_write(g, ") = %s;", foreign_name); + cgen_write(g, ")"); + if (ctypes[0].kind == CTYPE_NONE) + cgen_type_post(g, &fn_types[0]); + cgen_write(g, "= %s;", foreign_name); } cgen_nl(g); return; |