diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-08-27 15:21:06 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-08-27 15:21:06 -0400 |
commit | df10470f1f10f1f1f2f5cad792976de8d734bf27 (patch) | |
tree | 5377bd2f9efc2af4f5c46430da88a4476f14103a /types_cgen.c | |
parent | 126c496ad8a6e9a3b90ecd25c8ff3ead630f7f65 (diff) |
fixed functions
Diffstat (limited to 'types_cgen.c')
-rw-r--r-- | types_cgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/types_cgen.c b/types_cgen.c index 541f1b5..28db722 100644 --- a/types_cgen.c +++ b/types_cgen.c @@ -26,6 +26,8 @@ static bool cgen_types_expr(CGenerator *g, Expression *e) { case EXPR_FN: { if (e->fn.name && g->block == NULL) { /* write named function prototypes in global scope to header file */ g->writing_to = CGEN_WRITING_TO_H; + } else { + g->writing_to = CGEN_WRITING_TO_C; } if (!cgen_types_fn(g, &e->fn, e->where)) return false; |