diff options
author | Xinchen Hui <laruence@php.net> | 2014-06-25 00:39:37 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-06-25 00:39:37 +0800 |
commit | 284141ca8fa94dac846d593af0628dbfc719402e (patch) | |
tree | 54823e2887bc65c522e51ff02b480c4be87cbdad /Zend/zend_API.c | |
parent | ee30cc8a1e016bce8a2828d7755dfb7540a5a40c (diff) | |
download | php-git-284141ca8fa94dac846d593af0628dbfc719402e.tar.gz |
Fixed _zend_get_parameters_array
it should not decrease the refcount (spotted by
register_shutdown_function in ext/mysqli/tests/bug49442.phpt)
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index ea333632be..d2b474c15b 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -78,40 +78,6 @@ ZEND_API int zend_get_parameters(int ht, int param_count, ...) /* {{{ */ } /* }}} */ -ZEND_API int _zend_get_parameters_array(int ht, int param_count, zval *argument_array TSRMLS_DC) /* {{{ */ -{ - zval *p; - int arg_count; - zval *param_ptr; - - p = zend_vm_stack_top(TSRMLS_C) - 1; - arg_count = Z_LVAL_P(p); - - if (param_count>arg_count) { - return FAILURE; - } - - while (param_count-->0) { - param_ptr = (p-arg_count); - if (Z_REFCOUNTED_P(param_ptr) && - !Z_ISREF_P(param_ptr) && - Z_REFCOUNT_P(param_ptr) > 1) { - zval new_tmp; - - ZVAL_DUP(&new_tmp, param_ptr); - Z_DELREF_P(param_ptr); - ZVAL_COPY_VALUE(argument_array, &new_tmp); - } else { - ZVAL_COPY_VALUE(argument_array, param_ptr); - } - argument_array++; - arg_count--; - } - - return SUCCESS; -} -/* }}} */ - /* Zend-optimized Extended functions */ /* this function doesn't check for too many parameters */ ZEND_API int zend_get_parameters_ex(int param_count, ...) /* {{{ */ |