diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-04-01 17:39:47 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-04-01 17:39:47 -0400 |
commit | 157ffb0e7c17c61d05462e5ffdce19620485b0b1 (patch) | |
tree | 1c8d5f1583a2b247ddb6a12ef23d2f3bed253e92 /cgen.c | |
parent | 8b93c704d059609f9ba8e3d946a9dc722e72318e (diff) |
block cleanup
Diffstat (limited to 'cgen.c')
-rw-r--r-- | cgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -256,7 +256,7 @@ static inline void cgen_writeln(CGenerator *g, const char *fmt, ...) { /* should this declaration be a direct function declaration C? (as opposed to using a function pointer or not being a function) */ static bool cgen_fn_is_direct(CGenerator *g, Declaration *d) { - return (g->block == NULL || (g->block->flags & BLOCK_IS_NMS)) && (d->flags & DECL_HAS_EXPR) && d->expr.kind == EXPR_FN && arr_len(d->idents) == 1; + return g->fn == NULL && (d->flags & DECL_HAS_EXPR) && d->expr.kind == EXPR_FN && arr_len(d->idents) == 1; } static bool fn_has_instances(FnExpr *f) { |