diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-02-07 19:29:53 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-02-07 19:29:53 -0500 |
commit | f94bf833f031611b49fa9674af44dba1f55e7c24 (patch) | |
tree | 207001de6fdf84410a0d9aa09037f91f1aa7244d /cgen.c | |
parent | b40db0bcddda8472f3d4f5fbf7d86a4efb77a6a4 (diff) |
got #export to work
Diffstat (limited to 'cgen.c')
-rw-r--r-- | cgen.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -562,7 +562,8 @@ static bool cgen_fn_args(CGenerator *g, FnExpr *f, U64 instance, U64 which_are_c static bool cgen_fn_header(CGenerator *g, FnExpr *f, U64 instance, U64 which_are_const) { bool out_param = cgen_uses_ptr(&f->ret_type); assert(cgen_should_gen_fn(f)); - cgen_write(g, "static "); + if (!(f->flags & FN_EXPR_EXPORT)) + cgen_write(g, "static "); if (out_param) { cgen_write(g, "void "); } else { |