Browse Source

fixed List.remove (haXe/PHP)

Franco Ponticelli 17 years ago
parent
commit
7b66f7888b
2 changed files with 3 additions and 4 deletions
  1. 2 3
      std/List.hx
  2. 1 1
      std/php/Boot.hx

+ 2 - 3
std/List.hx

@@ -149,10 +149,9 @@ class List<T> {
 	public function remove( v : T ) : Bool {
 		var prev = null;
 		#if php
-		var l = null;
-		untyped __php__("$l =& $this->h");
+		var l = untyped __php__("& $this->h");
 		while( l != null ) {
-			if(untyped __php__("$l[0] == $v")) {
+			if(untyped __php__("$l[0] === $v")) {
 				if( prev == null )
 					untyped __php__("$this->h =& $l[1]");
 				else

+ 1 - 1
std/php/Boot.hx

@@ -219,7 +219,7 @@ function _hx_field($o, $field) {
 		if($o instanceof _hx_type) {
 			if(is_callable(array($o->__tname__, $field))) {
 				return array($o->__tname__, $field);
-			} else {
+			} else {				
 				return eval('return '.$o->__tname__.'::$'.$field.';');
 			}
 		} else {