Browse Source

Lua : Reflect.hx fixes

There was still some old js code in here.  I'm replace it with lua
equivalents.
Justin Donaldson 10 years ago
parent
commit
48f9bf7e77
1 changed files with 1 additions and 6 deletions
  1. 1 6
      std/lua/_std/Reflect.hx

+ 1 - 6
std/lua/_std/Reflect.hx

@@ -49,12 +49,7 @@
 
 	public static function fields( o : Dynamic ) : Array<String> {
 		var a = [];
-		if (o != null) untyped {
-			var hasOwnProperty = __js__('Object').prototype.hasOwnProperty;
-			__js__("for( var f in o ) {");
-			if( f != "__id__" && f != "hx__closures__" && hasOwnProperty.call(o, f) ) a.push(f);
-			__js__("}");
-		}
+		untyped __lua__("for i,v in pairs(o) do a:push(i) end");
 		return a;
 	}