Pārlūkot izejas kodu

Lua : fix the _bind command for variable argument functions

Justin Donaldson 10 gadi atpakaļ
vecāks
revīzija
746c02f8f8
1 mainītis faili ar 1 papildinājumiem un 4 dzēšanām
  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;