diff cbackend_c.rhope @ 159:d1e206ff75f9

Fix some bugs involving calling a worker object
author Mike Pavone <pavone@retrodev.com>
date Fri, 07 Jan 2011 03:17:20 -0500
parents 29b479a2ce48
children bac2c74801f0
line wrap: on
line diff
--- a/cbackend_c.rhope	Thu Dec 23 16:16:31 2010 -0500
+++ b/cbackend_c.rhope	Fri Jan 07 03:17:20 2011 -0500
@@ -848,12 +848,13 @@
 		{
 			to call <- [args]Index[0]
 			last numparams <- [func]Last NumParams >>
-			out <- [[[[[[func]Add Raw Line[[["if (get_blueprint("]Append[Make Op[Strip Addref[to call], func]]]Append[")->type_id == TYPE_WORKER) {"]]
+			out <- [[[[[[[func]Add Raw Line[[["if (get_blueprint("]Append[Make Op[Strip Addref[to call], func]]]Append[")->type_id == TYPE_WORKER) {"]]
 			]Val Call[to call, Tail[args,1]]
 			]Add Raw Line["} else {"]
 			]Last NumParams <<[last numparams]
 			]Func Base["Call",args, "Call"]
 			]Add Raw Line["}"]
+			]Last NumParams <<[[Length[args]]-[1]]
 		}{
 			out <- [func]Func Base[Escape Rhope Name[name,[func]Escape Pattern >>],args, "Call"]
 		}