summaryrefslogtreecommitdiff
path: root/codegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'codegen.c')
-rw-r--r--codegen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/codegen.c b/codegen.c
index 8b99e64..5111c76 100644
--- a/codegen.c
+++ b/codegen.c
@@ -153,9 +153,11 @@ const void typedecl(Type *type) {
println("typedef Type_%d * Type_%d ;", type->base->id, type->id);
break;
case TY_FUNC: {
+ type->id = 0;
typedecl(type->return_ty);
for (Type *p = type->params; p; p = p->next)
typedecl(p);
+ if (!type->id) type->id = count();
printnoln("typedef Type_%d Type_%d ( ", type->return_ty->id, type->id);
int i = 0;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback