diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-05-29 17:58:06 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-05-29 17:58:06 +0300 |
commit | d90c6f2443d3c8b4e1e83b3e0fbfc58d1fe5e84f (patch) | |
tree | b651c9cea24d5fd0c82796e498a46f1b96b40e4d /Zend | |
parent | 44be0fa67b46506353c3dd27d97801bd0eddbb00 (diff) | |
download | php-git-d90c6f2443d3c8b4e1e83b3e0fbfc58d1fe5e84f.tar.gz |
Removed useless zval_ptr_dtor()
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend.c | 6 | ||||
-rw-r--r-- | Zend/zend_API.c | 4 | ||||
-rw-r--r-- | Zend/zend_closures.c | 2 | ||||
-rw-r--r-- | Zend/zend_operators.c | 2 |
4 files changed, 3 insertions, 11 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index b29d7baa76..ea397db1c4 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1341,7 +1341,7 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a CG(in_compilation) = 0; } - if (call_user_function_ex(CG(function_table), NULL, &orig_user_error_handler, &retval, 5, params, 1, NULL) == SUCCESS) { + if (call_user_function(CG(function_table), NULL, &orig_user_error_handler, &retval, 5, params) == SUCCESS) { if (Z_TYPE(retval) != IS_UNDEF) { if (Z_TYPE(retval) == IS_FALSE) { zend_error_cb(type, error_filename, error_lineno, format, args); @@ -1361,10 +1361,8 @@ static ZEND_COLD void zend_error_va_list(int type, const char *format, va_list a } zval_ptr_dtor(¶ms[4]); - zval_ptr_dtor(¶ms[3]); zval_ptr_dtor(¶ms[2]); zval_ptr_dtor(¶ms[1]); - zval_ptr_dtor(¶ms[0]); if (Z_TYPE(EG(user_error_handler)) == IS_UNDEF) { ZVAL_COPY_VALUE(&EG(user_error_handler), &orig_user_error_handler); @@ -1529,7 +1527,7 @@ ZEND_API void zend_try_exception_handler() /* {{{ */ ZVAL_OBJ(¶ms[0], old_exception); ZVAL_COPY_VALUE(&orig_user_exception_handler, &EG(user_exception_handler)); - if (call_user_function_ex(CG(function_table), NULL, &orig_user_exception_handler, &retval2, 1, params, 1, NULL) == SUCCESS) { + if (call_user_function(CG(function_table), NULL, &orig_user_exception_handler, &retval2, 1, params) == SUCCESS) { zval_ptr_dtor(&retval2); if (EG(exception)) { OBJ_RELEASE(EG(exception)); diff --git a/Zend/zend_API.c b/Zend/zend_API.c index c493a3a67d..a2ea7a7030 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1740,7 +1740,6 @@ ZEND_API int add_property_long_ex(zval *arg, const char *key, size_t key_len, ze ZVAL_LONG(&tmp, n); ZVAL_STRINGL(&z_key, key, key_len); Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, &tmp, NULL); - zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ zval_ptr_dtor(&z_key); return SUCCESS; } @@ -1754,7 +1753,6 @@ ZEND_API int add_property_bool_ex(zval *arg, const char *key, size_t key_len, ze ZVAL_BOOL(&tmp, b); ZVAL_STRINGL(&z_key, key, key_len); Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, &tmp, NULL); - zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ zval_ptr_dtor(&z_key); return SUCCESS; } @@ -1768,7 +1766,6 @@ ZEND_API int add_property_null_ex(zval *arg, const char *key, size_t key_len) /* ZVAL_NULL(&tmp); ZVAL_STRINGL(&z_key, key, key_len); Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, &tmp, NULL); - zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ zval_ptr_dtor(&z_key); return SUCCESS; } @@ -1796,7 +1793,6 @@ ZEND_API int add_property_double_ex(zval *arg, const char *key, size_t key_len, ZVAL_DOUBLE(&tmp, d); ZVAL_STRINGL(&z_key, key, key_len); Z_OBJ_HANDLER_P(arg, write_property)(arg, &z_key, &tmp, NULL); - zval_ptr_dtor(&tmp); /* write_property will add 1 to refcount */ zval_ptr_dtor(&z_key); return SUCCESS; } diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index f69592e223..77ee4c4e6c 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -51,7 +51,7 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */ zend_function *func = EX(func); zval *arguments = ZEND_CALL_ARG(execute_data, 1); - if (call_user_function_ex(CG(function_table), NULL, getThis(), return_value, ZEND_NUM_ARGS(), arguments, 1, NULL) == FAILURE) { + if (call_user_function(CG(function_table), NULL, getThis(), return_value, ZEND_NUM_ARGS(), arguments) == FAILURE) { RETVAL_FALSE; } diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index d7abf13254..70ea7e5404 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2433,7 +2433,6 @@ try_again: ZVAL_LONG(&op2, 1); res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_ADD, op1, op1, &op2); - zval_ptr_dtor(&op2); return res; } @@ -2501,7 +2500,6 @@ try_again: ZVAL_LONG(&op2, 1); res = Z_OBJ_HANDLER_P(op1, do_operation)(ZEND_SUB, op1, op1, &op2); - zval_ptr_dtor(&op2); return res; } |