summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2003-08-04 07:53:09 +0000
committerZeev Suraski <zeev@php.net>2003-08-04 07:53:09 +0000
commit1959133fb3cc04786adc12942d5c2ea417a556ae (patch)
tree1dcf6b43aa34537073a1bf886038ad7ed64dfb37 /Zend/zend_compile.c
parentfe9b5870af2e90be7d88133a6a0dd19a8d9e9b0a (diff)
downloadphp-git-1959133fb3cc04786adc12942d5c2ea417a556ae.tar.gz
Simplify code using XOR
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 1ff9bb1e37..894b96c15c 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -1607,15 +1607,12 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe)
}
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) {