diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-14 19:01:58 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-14 19:01:58 -0500 |
commit | 62349b1f6d9f5948f856e26e3b0eef19567198fa (patch) | |
tree | 907540e60d2973f4f15e9c7929422e7d24a0477d /cgen.c | |
parent | 2d647644449ead4ab3b477b5c2547bc6da29cc20 (diff) |
named args for imported fns
Diffstat (limited to 'cgen.c')
-rw-r--r-- | cgen.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -288,8 +288,10 @@ static inline void cgen_ident_simple(CGenerator *g, Identifier i) { static void cgen_ident(CGenerator *g, Identifier i) { IdentDecl *idecl = ident_decl(i); - if (idecl && idecl->kind == IDECL_DECL && idecl->decl->flags & DECL_EXPORT) + if (idecl && idecl->kind == IDECL_DECL && idecl->decl->flags & DECL_EXPORT) { + assert(g->pkg_prefix); cgen_write(g, "%s__", g->pkg_prefix); + } if (i == g->main_ident) { /* don't conflict with C's main! */ cgen_write(g, "main__"); |