summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgen.c b/cgen.c
index fa1fa2a..80507ee 100644
--- a/cgen.c
+++ b/cgen.c
@@ -242,11 +242,11 @@ static void cgen_ident(CGenerator *g, Identifier i) {
cgen_write(g, "%s", g->nms_prefix);
} else {
/* do prefix for references to siblings */
- if (g->nms && i->scope == &g->nms->body) {
+ if (g->nms && ident_scope(i) == &g->nms->body) {
cgen_write(g, "%s", g->nms_prefix);
}
}
- if (i == g->main_ident && i->decl_kind == IDECL_DECL && i->scope == NULL) {
+ if (i == g->main_ident && i->decl_kind == IDECL_DECL && ident_scope(i) == NULL) {
/* don't conflict with C's main! */
cgen_write(g, "main__");
} else {