cvs: ZendEngine2 / zend_compile.c

From: Date: Mon, 04 Aug 2003 07:53:09 +0000
Subject: cvs: ZendEngine2 / zend_compile.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1598@lists.php.net to get a copy of this message
zeev Mon Aug 4 03:53:09 2003 EDT Modified files: /ZendEngine2 zend_compile.c Log: Simplify code using XOR Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.454 ZendEngine2/zend_compile.c:1.455 --- ZendEngine2/zend_compile.c:1.454 Sun Aug 3 18:03:52 2003 +++ ZendEngine2/zend_compile.c Mon Aug 4 03:53:09 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.454 2003/08/03 22:03:52 helly Exp $ */ +/* $Id: zend_compile.c,v 1.455 2003/08/04 07:53:09 zeev Exp $ */ #include "zend_language_parser.h" #include "zend.h" @@ -1607,15 +1607,12 @@ } for (i=0; i< fe->common.num_args; i++) { - if (fe->common.arg_info[i].class_name) { - if (fe->common.prototype->common.arg_info[i].class_name) { - if (strcmp(fe->common.arg_info[i].class_name, fe->common.prototype->common.arg_info[i].class_name)!=0) { - return 0; - } - } else { - return 0; - } - } else if (fe->common.prototype->common.arg_info[i].class_name) { + if (ZEND_LOG_XOR(fe->common.arg_info[i].class_name, fe->common.prototype->common.arg_info[i].class_name)) { + /* Only one has a type hint and the other one doesn't */ + return 0; + } + if (fe->common.arg_info[i].class_name + && strcmp(fe->common.arg_info[i].class_name, fe->common.prototype->common.arg_info[i].class_name)!=0) { return 0; } if (fe->common.arg_info[i].pass_by_reference != fe->common.prototype->common.arg_info[i].pass_by_reference) {

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