summaryrefslogtreecommitdiff
path: root/typedefs_cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'typedefs_cgen.c')
-rw-r--r--typedefs_cgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/typedefs_cgen.c b/typedefs_cgen.c
index 879eb2f..a6453de 100644
--- a/typedefs_cgen.c
+++ b/typedefs_cgen.c
@@ -31,7 +31,7 @@ static bool typedefs_decl(CGenerator *g, Declaration *d) {
Value *val = decl_val_at_index(d, idx);
if (type->kind == TYPE_TYPE) {
if (d->c.ids == NULL)
- d->c.ids = calloc(arr_len(d->idents), sizeof *d->c.ids);
+ d->c.ids = allocr_calloc(g->allocr, arr_len(d->idents), sizeof *d->c.ids);
/* generate typedef */
IdentID id = 0;
if (g->block != NULL) id = d->c.ids[idx] = g->ident_counter++;