diff options
| author | Dmitry Stogov <dmitry@zend.com> | 2018-07-09 12:46:46 +0300 | 
|---|---|---|
| committer | Dmitry Stogov <dmitry@zend.com> | 2018-07-09 12:46:46 +0300 | 
| commit | 67b4c3379a1c7f8a34522972c9cb3adf3776bc4a (patch) | |
| tree | 4089d3d836a02d9b94d2eb6304ac3b9d3c57e21f /Zend/zend_execute.c | |
| parent | 094c2aaf8371064528878f63e12b8347eefb2b71 (diff) | |
| download | php-git-67b4c3379a1c7f8a34522972c9cb3adf3776bc4a.tar.gz | |
Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY()
Diffstat (limited to 'Zend/zend_execute.c')
| -rw-r--r-- | Zend/zend_execute.c | 14 | 
1 files changed, 3 insertions, 11 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 097ccc10e1..5012688c6b 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1450,12 +1450,8 @@ static zend_never_inline void zend_post_incdec_overloaded_property(zval *object,  			ZVAL_COPY_VALUE(z, value);  		} -		if (UNEXPECTED(Z_TYPE_P(z) == IS_REFERENCE)) { -			ZVAL_COPY(EX_VAR(opline->result.var), Z_REFVAL_P(z)); -		} else { -			ZVAL_COPY(EX_VAR(opline->result.var), z); -		} -		ZVAL_COPY(&z_copy, EX_VAR(opline->result.var)); +		ZVAL_COPY_DEREF(&z_copy, z); +		ZVAL_COPY(EX_VAR(opline->result.var), &z_copy);  		if (inc) {  			increment_function(&z_copy);  		} else { @@ -1499,11 +1495,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object,  			}  			ZVAL_COPY_VALUE(z, value);  		} -		if (UNEXPECTED(Z_TYPE_P(z) == IS_REFERENCE)) { -			ZVAL_COPY(&z_copy, Z_REFVAL_P(z)); -		} else { -			ZVAL_COPY(&z_copy, z); -		} +		ZVAL_COPY_DEREF(&z_copy, z);  		if (inc) {  			increment_function(&z_copy);  		} else {  | 
