summary refs log tree commit diff
path: root/lisc/util.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-17 13:41:12 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-17 13:41:12 -0400
commit240cfcd5cdda9301457867f9d26edcd0cf272b24 (patch)
tree83cf01d43ad41163c96c34f16f2d24a4e8f9eff9 /lisc/util.c
parent2889d44f24d8017f527f6f5aa1163065cc57e994 (diff)
downloadroux-240cfcd5cdda9301457867f9d26edcd0cf272b24.tar.gz
support return of structs
Diffstat (limited to 'lisc/util.c')
-rw-r--r--lisc/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisc/util.c b/lisc/util.c
index fc9884a..368a060 100644
--- a/lisc/util.c
+++ b/lisc/util.c
@@ -174,7 +174,7 @@ phicls(int t, Tmp *tmp /*, int c*/)
 }
 
 Ref
-newtmp(char *prfx, Fn *fn)
+newtmp(char *prfx, int k,  Fn *fn)
 {
 	static int n;
 	int t;
@@ -182,6 +182,7 @@ newtmp(char *prfx, Fn *fn)
 	t = fn->ntmp++;
 	vgrow(&fn->tmp, fn->ntmp);
 	sprintf(fn->tmp[t].name, "%s%d", prfx, ++n);
+	fn->tmp[t].cls = k;
 	fn->tmp[t].slot = -1;
 	fn->tmp[t].nuse = +1;
 	fn->tmp[t].ndef = +1;