diff runtime/func.h @ 101:f4fc0a98088a

Fixed some bugs that were preventing compiled compiler from working correctly. Need to address memory usage
author Mike Pavone <pavone@retrodev.com>
date Mon, 09 Aug 2010 23:53:20 -0400
parents f51c4c17457c
children 43cc42df26cc
line wrap: on
line diff
--- a/runtime/func.h	Mon Aug 09 02:03:57 2010 -0400
+++ b/runtime/func.h	Mon Aug 09 23:53:20 2010 -0400
@@ -126,7 +126,12 @@
 
 #define CopiedParam(num,convtypeid) Param(num,convtypeid) cdata->params[num] = copy_object(cdata->params[num]);
 #define Ret(num,val) cdata->params[num] = (object *)(val);
-#define NumRet(num) cdata->num_params = num;
+#define NumRet(num) cdata->num_params = num;\
+	if (num == 1 && !cdata->params[0])\
+	{\
+		puts("Worker with only one output failed to produce data for that output!");\
+		goto _exception;\
+	}
 #define Exception
 #define FuncDef(name) lt_ ## name * lv_ ## name;
 #define MethodDef(name) lt_ ## name ## AT_ ## type_name * lv_ ## name ## AT_ ## type_name;