cvs: ZendEngine2(PHP_5_3) / zend_compile.c

[email protected] ("Dmitry Stogov")
Newsgroups php.zend-engine.cvs
Message-ID <cvsdmitry1205840221@cvsserver>
dmitry		Tue Mar 18 11:37:01 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend_compile.c 
  Log:
  Removed hack (we don't need to modify class name).
  (the problem is covered by Zend/tests/ns_056.phpt)
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.52&r2=1.647.2.27.2.41.2.53&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.52 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.53
--- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.52	Tue Mar 18 08:36:28 2008
+++ ZendEngine2/zend_compile.c	Tue Mar 18 11:37:00 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.52 2008/03/18 08:36:28 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.53 2008/03/18 11:37:00 dmitry Exp $ */
 
 #include <zend_language_parser.h>
 #include "zend.h"
@@ -2278,14 +2278,10 @@
 			&& strcasecmp(fe->common.arg_info[i].class_name, proto->common.arg_info[i].class_name)!=0) {
 			char *colon;
 
-			if (fe->common.type == ZEND_USER_FUNCTION &&
-			    strchr(proto->common.arg_info[i].class_name, ':') == NULL &&
-			    (colon = zend_memrchr(fe->common.arg_info[i].class_name, ':', fe->common.arg_info[i].class_name_len)) != NULL &&
-			    strcasecmp(colon+1, proto->common.arg_info[i].class_name) == 0) {
-				efree((char*)fe->common.arg_info[i].class_name);
-				fe->common.arg_info[i].class_name = estrndup(proto->common.arg_info[i].class_name, proto->common.arg_info[i].class_name_len);
-				fe->common.arg_info[i].class_name_len = proto->common.arg_info[i].class_name_len;
-			} else {
+			if (fe->common.type != ZEND_USER_FUNCTION ||
+			    strchr(proto->common.arg_info[i].class_name, ':') != NULL ||
+			    (colon = zend_memrchr(fe->common.arg_info[i].class_name, ':', fe->common.arg_info[i].class_name_len)) == NULL ||
+			    strcasecmp(colon+1, proto->common.arg_info[i].class_name) != 0) {
 				return 0;
 			}
 		}
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.