com php-src: fci->retval is always set: Zend/zend_execute_A PI.c

From: Date: Sat, 24 May 2014 13:37:15 +0000
Subject: com php-src: fci->retval is always set: Zend/zend_execute_A PI.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78515@lists.php.net to get a copy of this message
Commit: b87cff66b871177c50317ede21cdd1c93250d28a Author: Xinchen Hui <laruence@php.net> Sat, 24 May 2014 21:37:15 +0800 Parents: 60e01e5d643056c9320de2ea2ee3f5396038b50e Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b87cff66b871177c50317ede21cdd1c93250d28a Log: fci->retval is always set Changed paths: M Zend/zend_execute_API.c Diff: diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 15f7973..9459344 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -857,10 +857,10 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS EG(active_op_array) = (zend_op_array *) EX(function_state).function; original_opline_ptr = EG(opline_ptr); - if (EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) { - zend_generator_create_zval(EG(active_op_array), fci->retval TSRMLS_CC); - } else { + if (EXPECTED((EG(active_op_array)->fn_flags & ZEND_ACC_GENERATOR) == 0)) { zend_execute(EG(active_op_array), fci->retval TSRMLS_CC); + } else { + zend_generator_create_zval(EG(active_op_array), fci->retval TSRMLS_CC); } EG(active_op_array) = original_op_array; @@ -885,9 +885,9 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS because it can break proper ones (Bug #34045) if (!EX(function_state).function->common.return_reference) { - INIT_PZVAL(*fci->retval_ptr_ptr); + INIT_PZVAL(*f); }*/ - if (EG(exception) && fci->retval) { + if (EG(exception)) { zval_ptr_dtor(fci->retval); ZVAL_UNDEF(fci->retval); } @@ -911,7 +911,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS } efree(EX(function_state).function); - if (EG(exception) && fci->retval) { + if (EG(exception)) { zval_ptr_dtor(fci->retval); ZVAL_UNDEF(fci->retval); }

« previous php.cvs (#78515) next »