summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cgen.c b/cgen.c
index 7628bd2..5586b6f 100644
--- a/cgen.c
+++ b/cgen.c
@@ -387,10 +387,10 @@ static bool cgen_type_pre(CGenerator *g, Type *t, Location where) {
return false;
case TYPE_STRUCT:
cgen_write(g, "struct ");
- if (t->struc->name) {
- cgen_ident(g, t->struc->name);
- } else if (t->struc->c.id) {
- cgen_ident_id(g, t->struc->c.id);
+ if (t->struc.def->name) {
+ cgen_ident(g, t->struc.def->name);
+ } else if (t->struc.def->c.id) {
+ cgen_ident_id(g, t->struc.def->c.id);
} else {
assert(0);
}
@@ -1832,8 +1832,8 @@ static bool cgen_val_ptr(CGenerator *g, void *v, Type *t, Location where) {
break;
case TYPE_STRUCT:
cgen_write(g, "{");
- arr_foreach(t->struc->fields, Field, f) {
- if (f != t->struc->fields)
+ arr_foreach(t->struc.def->fields, Field, f) {
+ if (f != t->struc.def->fields)
cgen_write(g, ", ");
cgen_val_ptr(g, (char *)v + f->offset, &f->type, where);
}