summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-11-10 14:57:13 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2019-11-10 14:57:13 -0500
commite800a25fd2c4945b465b4cd90b4d212272d1641c (patch)
treea1bbba056171c9f3c74e02fac000f0992f84d27f /cgen.c
parent45b3f700400c6e62dfb67ac08c1264e24f59e118 (diff)
added hash table test & fixed bugs there
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cgen.c b/cgen.c
index 575bdc7..a388b9b 100644
--- a/cgen.c
+++ b/cgen.c
@@ -734,9 +734,9 @@ static bool cgen_expr_pre(CGenerator *g, Expression *e) {
}
} else {
- cgen_type_pre(g, &e->type, e->where);
+ if (!cgen_type_pre(g, &e->type, e->where)) return false;
cgen_write(g, " %s", ret_name);
- cgen_type_post(g, &e->type, e->where);
+ if (!cgen_type_post(g, &e->type, e->where)) return false;
cgen_write(g, ";");
cgen_nl(g);
}
@@ -913,7 +913,7 @@ static bool cgen_expr_pre(CGenerator *g, Expression *e) {
if (!cgen_type_pre(g, &ea->type, e->where))
return false;
if (uses_ptr)
- cgen_write(g, "p_");
+ cgen_write(g, " p_");
else
cgen_write(g, "(*p_)");
if (!cgen_type_post(g, &ea->type, e->where))