com php-src: Fixed zend_is_true to support IS_REFER ENCE: Zend/zend_execute.h

From: Date: Wed, 05 Mar 2014 14:31:02 +0000
Subject: com php-src: Fixed zend_is_true to support IS_REFER ENCE: Zend/zend_execute.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77766@lists.php.net to get a copy of this message
Commit: 9a4e16db6f38010b32fe4bddad92e28e56423153 Author: Xinchen Hui <laruence@gmail.com> Wed, 5 Mar 2014 22:31:02 +0800 Parents: 84f20dc212e18c34e60ede87a756dd95f56531f1 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9a4e16db6f38010b32fe4bddad92e28e56423153 Log: Fixed zend_is_true to support IS_REFERENCE Changed paths: M Zend/zend_execute.h Diff: diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 7a87554..3db755f 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -115,6 +115,7 @@ static zend_always_inline int i_zend_is_true(zval *op TSRMLS_DC) { int result; +again: switch (Z_TYPE_P(op)) { case IS_NULL: result = 0; @@ -139,7 +140,7 @@ static zend_always_inline int i_zend_is_true(zval *op TSRMLS_DC) result = (zend_hash_num_elements(Z_ARRVAL_P(op))?1:0); break; case IS_OBJECT: - if(IS_ZEND_STD_OBJECT(*op)) { + if (IS_ZEND_STD_OBJECT(*op)) { if (Z_OBJ_HT_P(op)->cast_object) { zval tmp; if (Z_OBJ_HT_P(op)->cast_object(op, &tmp, IS_BOOL TSRMLS_CC) == SUCCESS) { @@ -159,6 +160,10 @@ static zend_always_inline int i_zend_is_true(zval *op TSRMLS_DC) } result = 1; break; + case IS_REFERENCE: + op = Z_REFVAL_P(op); + goto again; + break; default: result = 0; break;

« previous php.cvs (#77766) next »