Prechádzať zdrojové kódy

patched previous changes (haXe/PHP)

Franco Ponticelli 16 rokov pred
rodič
commit
2bd4ceaff8
2 zmenil súbory, kde vykonal 5 pridanie a 4 odobranie
  1. 2 1
      genphp.ml
  2. 3 3
      std/php/Boot.hx

+ 2 - 1
genphp.ml

@@ -503,8 +503,9 @@ and gen_call ctx e el =
 		genargs el;
 	| TLocal "__setfield__" , e :: (f :: el) ->
 		gen_value ctx e;
-		spr ctx "->";
+		spr ctx "->{";
 		gen_value ctx f;
+		spr ctx "}";
 		genargs el;
 	| TLocal "__field__" , e :: (f :: el) ->
 		gen_value ctx e;

+ 3 - 3
std/php/Boot.hx

@@ -217,7 +217,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 {
@@ -339,8 +339,8 @@ function _hx_register_type($t) {
 }
 
 function _hx_set_method($o, $field, $func) {
-	$value[0]->scope = $o; 
-	$o->$field = $value;
+	$value[0]->scope = $o;
+	$o->$field = $func;
 }
 
 function _hx_shift_right($v, $n) {