瀏覽代碼

Lua : fix the _bind command for variable argument functions

Justin Donaldson 10 年之前
父節點
當前提交
746c02f8f8
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      std/lua/Boot.hx

+ 1 - 4
std/lua/Boot.hx

@@ -59,10 +59,7 @@ class Boot {
 		if ( o.hx__closures__ == null ) o.hx__closures__ = {};
 		else untyped f = o.hx__closures__[m];
 		if (f == null){
-			f = function(arg){
-				return Std.is(arg,Table) ? m(o,lua.Table.unpack(arg))
-					: m(o,arg);
-			};
+			f = untyped __lua__("function(...) return m(o,arg) end;");
 			untyped o.hx__closures__[m] = f;
 		}
 		return f;