summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-29 17:58:06 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-29 17:58:06 +0300
commitd90c6f2443d3c8b4e1e83b3e0fbfc58d1fe5e84f (patch)
treeb651c9cea24d5fd0c82796e498a46f1b96b40e4d
parent44be0fa67b46506353c3dd27d97801bd0eddbb00 (diff)
downloadphp-git-d90c6f2443d3c8b4e1e83b3e0fbfc58d1fe5e84f.tar.gz
Removed useless zval_ptr_dtor()
-rw-r--r--Zend/zend.c6
-rw-r--r--Zend/zend_API.c4
-rw-r--r--Zend/zend_closures.c2
-rw-r--r--Zend/zend_operators.c2
-rw-r--r--ext/com_dotnet/com_wrapper.c4
-rw-r--r--ext/curl/interface.c5
-rw-r--r--ext/json/json_encoder.c2
-rw-r--r--ext/pcntl/pcntl.c3
-rw-r--r--ext/readline/readline.c5
-rw-r--r--ext/reflection/php_reflection.c2
-rw-r--r--ext/soap/soap.c2
-rw-r--r--ext/spl/spl_array.c6
-rw-r--r--ext/spl/spl_directory.c1
-rw-r--r--ext/spl/spl_dllist.c1
-rw-r--r--ext/spl/spl_fixedarray.c3
-rw-r--r--ext/spl/spl_iterators.c1
-rw-r--r--ext/spl/spl_observer.c1
-rw-r--r--ext/standard/assert.c12
-rw-r--r--ext/standard/user_filters.c6
-rw-r--r--ext/standard/var.c2
-rw-r--r--ext/standard/var_unserializer.c2
-rw-r--r--ext/standard/var_unserializer.re2
-rw-r--r--ext/wddx/wddx.c4
-rw-r--r--main/streams/userspace.c33
24 files changed, 41 insertions, 70 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(&params[4]);
- zval_ptr_dtor(&params[3]);
zval_ptr_dtor(&params[2]);
zval_ptr_dtor(&params[1]);
- zval_ptr_dtor(&params[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(&params[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;
}
diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c
index 5312c20a6c..a8fb6f9ea1 100644
--- a/ext/com_dotnet/com_wrapper.c
+++ b/ext/com_dotnet/com_wrapper.c
@@ -288,8 +288,8 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
} else if (wFlags & DISPATCH_METHOD) {
zend_try {
retval = &rv;
- if (SUCCESS == call_user_function_ex(EG(function_table), &disp->object, name,
- retval, pdp->cArgs, params, 1, NULL)) {
+ if (SUCCESS == call_user_function(EG(function_table), &disp->object, name,
+ retval, pdp->cArgs, params)) {
ret = S_OK;
trace("function called ok\n");
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 4c2f7e52db..d197d5cd96 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -1553,10 +1553,6 @@ static size_t curl_progress(void *clientp, double dltotal, double dlnow, double
}
}
zval_ptr_dtor(&argv[0]);
- zval_ptr_dtor(&argv[1]);
- zval_ptr_dtor(&argv[2]);
- zval_ptr_dtor(&argv[3]);
- zval_ptr_dtor(&argv[4]);
break;
}
}
@@ -1619,7 +1615,6 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
zval_ptr_dtor(&argv[0]);
zval_ptr_dtor(&argv[1]);
- zval_ptr_dtor(&argv[2]);
break;
}
}
diff --git a/ext/json/json_encoder.c b/ext/json/json_encoder.c
index f28bfbd4e4..b3d0b57a7e 100644
--- a/ext/json/json_encoder.c
+++ b/ext/json/json_encoder.c
@@ -462,7 +462,7 @@ static int php_json_encode_serializable_object(smart_str *buf, zval *val, int op
ZVAL_STRING(&fname, "jsonSerialize");
- if (FAILURE == call_user_function_ex(EG(function_table), val, &fname, &retval, 0, NULL, 1, NULL) || Z_TYPE(retval) == IS_UNDEF) {
+ if (FAILURE == call_user_function(EG(function_table), val, &fname, &retval, 0, NULL) || Z_TYPE(retval) == IS_UNDEF) {
if (!EG(exception)) {
zend_throw_exception_ex(NULL, 0, "Failed calling %s::jsonSerialize()", ZSTR_VAL(ce->name));
}
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index c65e1ecd66..9c51659181 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -1463,8 +1463,9 @@ void pcntl_signal_dispatch()
/* FIXME: this is probably broken when multiple signals are handled in this while loop (retval) */
call_user_function(EG(function_table), NULL, handle, &retval, 2, params);
zval_ptr_dtor(&retval);
- zval_ptr_dtor(&params[0]);
+#ifdef HAVE_STRUCT_SIGINFO_T
zval_ptr_dtor(&params[1]);
+#endif
}
}
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index 1067ef3f28..fb4b9b0063 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -509,7 +509,6 @@ static void _readline_long_zval(zval *ret, long l)
static char **_readline_completion_cb(const char *text, int start, int end)
{
zval params[3];
- int i;
char **matches = NULL;
_readline_string_zval(&params[0], text);
@@ -531,9 +530,7 @@ static char **_readline_completion_cb(const char *text, int start, int end)
}
}
- for (i = 0; i < 3; i++) {
- zval_ptr_dtor(&params[i]);
- }
+ zval_ptr_dtor(&params[0]);
zval_ptr_dtor(&_readline_array);
return matches;
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 0364c06441..5e71aa38f9 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1470,7 +1470,7 @@ ZEND_METHOD(reflection, export)
/* Invoke the __toString() method */
ZVAL_STRINGL(&fname, "__tostring", sizeof("__tostring") - 1);
- result= call_user_function_ex(NULL, object, &fname, &retval, 0, NULL, 0, NULL);
+ result= call_user_function(NULL, object, &fname, &retval, 0, NULL);
zval_dtor(&fname);
if (result == FAILURE) {
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index fae7d2a444..097a5dfcc2 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -2563,8 +2563,6 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
_bailout = 1;
} zend_end_try();
zval_ptr_dtor(&func);
- zval_ptr_dtor(&params[4]);
- zval_ptr_dtor(&params[3]);
zval_ptr_dtor(&params[2]);
zval_ptr_dtor(&params[1]);
zval_ptr_dtor(&params[0]);
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index 2b4e5b8098..26bb6b1164 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -1479,7 +1479,7 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam
if (!use_arg) {
intern->nApplyCount++;
- call_user_function_ex(EG(function_table), NULL, &function_name, return_value, 1, params, 1, NULL);
+ call_user_function(EG(function_table), NULL, &function_name, return_value, 1, params);
intern->nApplyCount--;
} else if (use_arg == SPL_ARRAY_METHOD_MAY_USER_ARG) {
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "|z", &arg) == FAILURE) {
@@ -1490,7 +1490,7 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam
ZVAL_COPY_VALUE(&params[1], arg);
}
intern->nApplyCount++;
- call_user_function_ex(EG(function_table), NULL, &function_name, return_value, arg ? 2 : 1, params, 1, NULL);
+ call_user_function(EG(function_table), NULL, &function_name, return_value, arg ? 2 : 1, params);
intern->nApplyCount--;
} else {
if (ZEND_NUM_ARGS() != 1 || zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z", &arg) == FAILURE) {
@@ -1499,7 +1499,7 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam
}
ZVAL_COPY_VALUE(&params[1], arg);
intern->nApplyCount++;
- call_user_function_ex(EG(function_table), NULL, &function_name, return_value, 2, params, 1, NULL);
+ call_user_function(EG(function_table), NULL, &function_name, return_value, 2, params);
intern->nApplyCount--;
}
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 54bd6762bc..3c3a0012dc 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1521,7 +1521,6 @@ SPL_METHOD(RecursiveDirectoryIterator, getChildren)
ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len);
spl_instantiate_arg_ex2(Z_OBJCE_P(getThis()), return_value, &zpath, &zflags);
zval_ptr_dtor(&zpath);
- zval_ptr_dtor(&zflags);
subdir = Z_SPLFILESYSTEM_P(return_value);
if (subdir) {
diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c
index b0ce0e508f..20cf6abcbc 100644
--- a/ext/spl/spl_dllist.c
+++ b/ext/spl/spl_dllist.c
@@ -1146,7 +1146,6 @@ SPL_METHOD(SplDoublyLinkedList, serialize)
/* flags */
ZVAL_LONG(&flags, intern->flags);
php_var_serialize(&buf, &flags, &var_hash);
- zval_ptr_dtor(&flags);
/* elements */
while (current) {
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 104b3d071e..7e3e4c23d6 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -877,7 +877,6 @@ static zval *spl_fixedarray_it_get_current_data(zend_object_iterator *iter) /* {
ZVAL_LONG(&zindex, object->current);
data = spl_fixedarray_object_read_dimension_helper(object, &zindex);
- zval_ptr_dtor(&zindex);
if (data == NULL) {
data = &EG(uninitialized_zval);
@@ -983,8 +982,6 @@ SPL_METHOD(SplFixedArray, current)
value = spl_fixedarray_object_read_dimension_helper(intern, &zindex);
- zval_ptr_dtor(&zindex);
-
if (value) {
ZVAL_DEREF(value);
ZVAL_COPY(return_value, value);
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index 2cea85549b..9e6d10f930 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -2509,7 +2509,6 @@ static inline void spl_limit_it_seek(spl_dual_it_object *intern, zend_long pos)
ZVAL_LONG(&zpos, pos);
spl_dual_it_free(intern);
zend_call_method_with_1_params(&intern->inner.zobject, intern->inner.ce, NULL, "seek", NULL, &zpos);
- zval_ptr_dtor(&zpos);
if (!EG(exception)) {
intern->current.pos = pos;
if (spl_limit_it_valid(intern) == SUCCESS) {
diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c
index 9a92a0e53d..2dd3e17896 100644
--- a/ext/spl/spl_observer.c
+++ b/ext/spl/spl_observer.c
@@ -713,7 +713,6 @@ SPL_METHOD(SplObjectStorage, serialize)
smart_str_appendl(&buf, "x:", 2);
ZVAL_LONG(&flags, zend_hash_num_elements(&intern->storage));
php_var_serialize(&buf, &flags, &var_hash);
- zval_ptr_dtor(&flags);
zend_hash_internal_pointer_reset_ex(&intern->storage, &pos);
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 4f343379e0..8296b85f2f 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -218,7 +218,6 @@ PHP_FUNCTION(assert)
if (Z_TYPE(ASSERTG(callback)) != IS_UNDEF) {
zval args[4];
zval retval;
- int i;
uint32_t lineno = zend_get_executed_lineno();
const char *filename = zend_get_executed_filename();
@@ -231,15 +230,14 @@ PHP_FUNCTION(assert)
/* XXX do we want to check for error here? */
if (!description) {
call_user_function(CG(function_table), NULL, &ASSERTG(callback), &retval, 3, args);
- for (i = 0; i <= 2; i++) {
- zval_ptr_dtor(&(args[i]));
- }
+ zval_ptr_dtor(&(args[2]));
+ zval_ptr_dtor(&(args[0]));
} else {
ZVAL_STR(&args[3], zval_get_string(description));
call_user_function(CG(function_table), NULL, &ASSERTG(callback), &retval, 4, args);
- for (i = 0; i <= 3; i++) {
- zval_ptr_dtor(&(args[i]));
- }
+ zval_ptr_dtor(&(args[3]));
+ zval_ptr_dtor(&(args[2]));
+ zval_ptr_dtor(&(args[0]));
}
zval_ptr_dtor(&retval);
diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c
index ac7f40f374..42bfdad48d 100644
--- a/ext/standard/user_filters.c
+++ b/ext/standard/user_filters.c
@@ -139,11 +139,10 @@ static void userfilter_dtor(php_stream_filter *thisfilter)
ZVAL_STRINGL(&func_name, "onclose", sizeof("onclose")-1);
- call_user_function_ex(NULL,
+ call_user_function(NULL,
obj,
&func_name,
&retval,
- 0, NULL,
0, NULL);
zval_ptr_dtor(&retval);
@@ -344,11 +343,10 @@ static php_stream_filter *user_filter_factory_create(const char *filtername,
/* invoke the constructor */
ZVAL_STRINGL(&func_name, "oncreate", sizeof("oncreate")-1);
- call_user_function_ex(NULL,
+ call_user_function(NULL,
&obj,
&func_name,
&retval,
- 0, NULL,
0, NULL);
if (Z_TYPE(retval) != IS_UNDEF) {
diff --git a/ext/standard/var.c b/ext/standard/var.c
index c6465fb893..1252097380 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -678,7 +678,7 @@ static int php_var_serialize_call_sleep(zval *retval, zval *struc) /* {{{ */
ZVAL_STRINGL(&fname, "__sleep", sizeof("__sleep") - 1);
BG(serialize_lock)++;
- res = call_user_function_ex(CG(function_table), struc, &fname, retval, 0, 0, 1, NULL);
+ res = call_user_function(CG(function_table), struc, &fname, retval, 0, 0);
BG(serialize_lock)--;
zval_dtor(&fname);
diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c
index e4b8321e63..936cef2cd0 100644
--- a/ext/standard/var_unserializer.c
+++ b/ext/standard/var_unserializer.c
@@ -221,7 +221,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
}
BG(serialize_lock)++;
- if (call_user_function_ex(CG(function_table), zv, &wakeup_name, &retval, 0, 0, 1, NULL) == FAILURE || Z_ISUNDEF(retval)) {
+ if (call_user_function(CG(function_table), zv, &wakeup_name, &retval, 0, 0) == FAILURE || Z_ISUNDEF(retval)) {
wakeup_failed = 1;
GC_ADD_FLAGS(Z_OBJ_P(zv), IS_OBJ_DESTRUCTOR_CALLED);
}
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index 0af53592d4..6f09effbef 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -219,7 +219,7 @@ PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
}
BG(serialize_lock)++;
- if (call_user_function_ex(CG(function_table), zv, &wakeup_name, &retval, 0, 0, 1, NULL) == FAILURE || Z_ISUNDEF(retval)) {
+ if (call_user_function(CG(function_table), zv, &wakeup_name, &retval, 0, 0) == FAILURE || Z_ISUNDEF(retval)) {
wakeup_failed = 1;
GC_ADD_FLAGS(Z_OBJ_P(zv), IS_OBJ_DESTRUCTOR_CALLED);
}
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index dd16313bbb..6dde04f4e5 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -476,7 +476,7 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
* We try to call __sleep() method on object. It's supposed to return an
* array of property names to be serialized.
*/
- if (call_user_function_ex(CG(function_table), obj, &fname, &retval, 0, 0, 1, NULL) == SUCCESS) {
+ if (call_user_function(CG(function_table), obj, &fname, &retval, 0, 0) == SUCCESS) {
if (!Z_ISUNDEF(retval) && (sleephash = HASH_OF(&retval))) {
php_wddx_add_chunk_static(packet, WDDX_STRUCT_S);
snprintf(tmp_buf, WDDX_BUF_LEN, WDDX_VAR_S, PHP_CLASS_NAME_VAR);
@@ -926,7 +926,7 @@ static void php_wddx_pop_element(void *user_data, const XML_Char *name)
ZVAL_STRING(&fname, "__wakeup");
- call_user_function_ex(NULL, &ent1->data, &fname, &retval, 0, 0, 0, NULL);
+ call_user_function(NULL, &ent1->data, &fname, &retval, 0, 0);
zval_ptr_dtor(&fname);
zval_ptr_dtor(&retval);
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index fedcc3f8bb..5f70e0ac73 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -689,11 +689,11 @@ static size_t php_userstreamop_read(php_stream *stream, char *buf, size_t count)
ZVAL_STRINGL(&func_name, USERSTREAM_EOF, sizeof(USERSTREAM_EOF)-1);
- call_result = call_user_function_ex(NULL,
+ call_result = call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval)) {
stream->eof = 1;
@@ -721,11 +721,11 @@ static int php_userstreamop_close(php_stream *stream, int close_handle)
ZVAL_STRINGL(&func_name, USERSTREAM_CLOSE, sizeof(USERSTREAM_CLOSE)-1);
- call_user_function_ex(NULL,
+ call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
zval_ptr_dtor(&retval);
zval_ptr_dtor(&func_name);
@@ -749,11 +749,11 @@ static int php_userstreamop_flush(php_stream *stream)
ZVAL_STRINGL(&func_name, USERSTREAM_FLUSH, sizeof(USERSTREAM_FLUSH)-1);
- call_result = call_user_function_ex(NULL,
+ call_result = call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval))
call_result = 0;
@@ -816,11 +816,11 @@ static int php_userstreamop_seek(php_stream *stream, zend_off_t offset, int when
/* now determine where we are */
ZVAL_STRINGL(&func_name, USERSTREAM_TELL, sizeof(USERSTREAM_TELL)-1);
- call_result = call_user_function_ex(NULL,
+ call_result = call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
if (call_result == SUCCESS && Z_TYPE(retval) == IS_LONG) {
*newoffs = Z_LVAL(retval);
@@ -886,11 +886,11 @@ static int php_userstreamop_stat(php_stream *stream, php_stream_statbuf *ssb)
ZVAL_STRINGL(&func_name, USERSTREAM_STAT, sizeof(USERSTREAM_STAT)-1);
- call_result = call_user_function_ex(NULL,
+ call_result = call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
if (call_result == SUCCESS && Z_TYPE(retval) == IS_ARRAY) {
if (SUCCESS == statbuf_from_array(&retval, ssb))
@@ -920,7 +920,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
switch (option) {
case PHP_STREAM_OPTION_CHECK_LIVENESS:
ZVAL_STRINGL(&func_name, USERSTREAM_EOF, sizeof(USERSTREAM_EOF)-1);
- call_result = call_user_function_ex(NULL, Z_ISUNDEF(us->object)? NULL : &us->object, &func_name, &retval, 0, NULL, 0, NULL);
+ call_result = call_user_function(NULL, Z_ISUNDEF(us->object)? NULL : &us->object, &func_name, &retval, 0, NULL);
if (call_result == SUCCESS && (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE)) {
ret = zval_is_true(&retval) ? PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
} else {
@@ -1412,11 +1412,10 @@ static size_t php_userstreamop_readdir(php_stream *stream, char *buf, size_t cou
ZVAL_STRINGL(&func_name, USERSTREAM_DIR_READ, sizeof(USERSTREAM_DIR_READ)-1);
- call_result = call_user_function_ex(NULL,
+ call_result = call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL,
0, NULL);
if (call_result == SUCCESS && Z_TYPE(retval) != IS_FALSE && Z_TYPE(retval) != IS_TRUE) {
@@ -1445,11 +1444,11 @@ static int php_userstreamop_closedir(php_stream *stream, int close_handle)
ZVAL_STRINGL(&func_name, USERSTREAM_DIR_CLOSE, sizeof(USERSTREAM_DIR_CLOSE)-1);
- call_user_function_ex(NULL,
+ call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
zval_ptr_dtor(&retval);
zval_ptr_dtor(&func_name);
@@ -1469,11 +1468,11 @@ static int php_userstreamop_rewinddir(php_stream *stream, zend_off_t offset, int
ZVAL_STRINGL(&func_name, USERSTREAM_DIR_REWIND, sizeof(USERSTREAM_DIR_REWIND)-1);
- call_user_function_ex(NULL,
+ call_user_function(NULL,
Z_ISUNDEF(us->object)? NULL : &us->object,
&func_name,
&retval,
- 0, NULL, 0, NULL);
+ 0, NULL);
zval_ptr_dtor(&retval);
zval_ptr_dtor(&func_name);