Browse Source

protect fixes.

Nicolas Cannasse 19 years ago
parent
commit
96894cfec0
2 changed files with 7 additions and 7 deletions
  1. 5 5
      std/Type.hx
  2. 2 2
      std/flash/Boot.hx

+ 5 - 5
std/Type.hx

@@ -250,7 +250,7 @@ class Type {
 				a = a.concat(Reflect.fields(untyped c.prototype));
 				c = untyped c.__super__;
 			}
-			while( a.remove("__class__") ) {
+			while( a.remove(__unprotect__("__class__")) ) {
 				#if neko
 				a.remove("__serialize");
 				a.remove("__string");
@@ -268,9 +268,9 @@ class Type {
 			return describe(c,false);
 		#else true
 			var a = Reflect.fields(c);
-			a.remove("__name__");
-			a.remove("__interfaces__");
-			a.remove("__super__");
+			a.remove(__unprotect__("__name__"));
+			a.remove(__unprotect__("__interfaces__"));
+			a.remove(__unprotect__("__super__"));
 			#if js
 			a.remove("prototype");
 			#end
@@ -291,7 +291,7 @@ class Type {
 			return describe(e,false);
 		#else true
 			var a = Reflect.fields(e);
-			a.remove("__ename__");
+			a.remove(__unprotect__("__ename__"));
 			#if neko
 			a.remove("prototype");
 			#end

+ 2 - 2
std/flash/Boot.hx

@@ -221,9 +221,9 @@ class Boot {
 				}
 			};
 			Array.prototype[__unprotect__("__class__")] = Array;
-			Array.__name__ = ["Array"];
+			Array[__unprotect__("__name__")] = ["Array"];
 			String.prototype[__unprotect__("__class__")] = String;
-			String.__name__ = ["String"];
+			String[__unprotect__("__name__")] = ["String"];
 			var cca = String.prototype["charCodeAt"];
 			String.prototype["charCodeAt"] = function(i) {
 				var x = cca["call"](this,i);