cvs: ZendEngine2 / zend_API.c zend_execute_API.c

From: Date: Fri, 24 Oct 2003 18:42:00 +0000
Subject: cvs: ZendEngine2 / zend_API.c zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1932@lists.php.net to get a copy of this message
helly Fri Oct 24 14:42:00 2003 EDT Modified files: /ZendEngine2 zend_API.c zend_execute_API.c Log: Revert accidental commit Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.222 ZendEngine2/zend_API.c:1.223 --- ZendEngine2/zend_API.c:1.222 Fri Oct 24 14:24:27 2003 +++ ZendEngine2/zend_API.c Fri Oct 24 14:42:00 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.222 2003/10/24 18:24:27 helly Exp $ */ +/* $Id: zend_API.c,v 1.223 2003/10/24 18:42:00 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1588,23 +1588,8 @@ return 1; lcname = zend_str_tolower_dup(Z_STRVAL_P(callable), Z_STRLEN_P(callable)); - if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1)) { + if (zend_hash_exists(EG(function_table), lcname, Z_STRLEN_P(callable)+1)) retval = 1; - } else { - char *func_pos; - if ((func_pos=strstr(lcname, "::"))) { - int lcclass_len = (int)(func_pos - lcname); - char *lcclass = estrndup(lcname, lcclass_len); - zend_class_entry **ce; - - if (zend_lookup_class(lcclass, lcclass_len, &ce TSRMLS_CC) == SUCCESS) { - int func_len = Z_STRLEN_P(callable) - lcclass_len - 2; - func_pos += 2; - retval = zend_hash_exists(&(*ce)->function_table, func_pos, func_len + 1) ? 1 : 0; - } - efree(lcclass); - } - } efree(lcname); break; Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.238 ZendEngine2/zend_execute_API.c:1.239 --- ZendEngine2/zend_execute_API.c:1.238 Fri Oct 24 14:24:27 2003 +++ ZendEngine2/zend_execute_API.c Fri Oct 24 14:42:00 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.238 2003/10/24 18:24:27 helly Exp $ */ +/* $Id: zend_execute_API.c,v 1.239 2003/10/24 18:42:00 helly Exp $ */ #include <stdio.h> #include <signal.h> @@ -532,8 +532,7 @@ zend_execute_data execute_data; zval *method_name; zval *params_array; - int call_via_handler = 0, success; - char *func_pos; + int call_via_handler = 0; switch (fci->size) { case sizeof(zend_fcall_info): @@ -617,26 +616,7 @@ function_name_lc = zend_str_tolower_dup(fci->function_name->value.str.val, fci->function_name->value.str.len); - success = zend_hash_find(fci->function_table, function_name_lc, fci->function_name->value.str.len+1, (void **) &EX(function_state).function); - if (success==FAILURE && !fci->object_pp && (func_pos=strstr(function_name_lc, "::"))) { - int class_name_lc_len = (int)(func_pos - function_name_lc); - char *class_name_lc = estrndup(function_name_lc, class_name_lc_len); - zend_class_entry **ce; - - success = zend_lookup_class(class_name_lc, class_name_lc_len, &ce TSRMLS_CC); - - efree(class_name_lc); - if (success == SUCCESS) { - int func_len = fci->function_name->value.str.len - class_name_lc_len - 2; - func_pos += 2; - fci->function_table = &(*ce)->function_table; - calling_scope = *ce; - fci->object_pp = NULL; - success = zend_hash_find(fci->function_table, func_pos, func_len + 1, (void **) &EX(function_state).function); - } - } - - if (success==FAILURE) { + if (zend_hash_find(fci->function_table, function_name_lc, fci->function_name->value.str.len+1, (void **) &EX(function_state).function)==FAILURE) { /* try calling __call */ if (calling_scope && calling_scope->__call) { EX(function_state).function = calling_scope->__call;

« previous php.zend-engine.cvs (#1932) next »