cvs: ZendEngine2 / zend_API.c

[email protected] ("Dmitry Stogov")
Newsgroups php.zend-engine.cvs
Message-ID <cvsdmitry1206450262@cvsserver>
dmitry		Tue Mar 25 13:04:22 2008 UTC

  Modified files:              
    /ZendEngine2	zend_API.c 
  Log:
  Optimized detection of "__call" and "__callstatic" methods.
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.465&r2=1.466&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.465 ZendEngine2/zend_API.c:1.466
--- ZendEngine2/zend_API.c:1.465	Wed Mar  5 14:39:05 2008
+++ ZendEngine2/zend_API.c	Tue Mar 25 13:04:22 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_API.c,v 1.465 2008/03/05 14:39:05 felipe Exp $ */
+/* $Id: zend_API.c,v 1.466 2008/03/25 13:04:22 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_execute.h"
@@ -3094,9 +3094,9 @@
 	fci->no_separation = 1;
 	fci->symbol_table = NULL;
 
-	if (ZEND_U_CASE_EQUAL(ZEND_STR_TYPE, func->common.function_name, USTR_LEN(func->common.function_name), ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1) ||
-		ZEND_U_CASE_EQUAL(ZEND_STR_TYPE, func->common.function_name, USTR_LEN(func->common.function_name), ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1)
-	) {
+	if (ce &&
+		(ZEND_U_CASE_EQUAL(ZEND_STR_TYPE, func->common.function_name, USTR_LEN(func->common.function_name), ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1) ||
+		 ZEND_U_CASE_EQUAL(ZEND_STR_TYPE, func->common.function_name, USTR_LEN(func->common.function_name), ZEND_CALLSTATIC_FUNC_NAME, sizeof(ZEND_CALLSTATIC_FUNC_NAME)-1))) {
 		fcc->initialized = 0;
 		fcc->function_handler = NULL;
 		fcc->calling_scope = NULL;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.