#define CTYPE(iswhat) \
zval *c, tmp; \
ZEND_PARSE_PARAMETERS_START(1, 1); \
- Z_PARAM_ZVAL_DEREF(c) \
+ Z_PARAM_ZVAL(c) \
ZEND_PARSE_PARAMETERS_END(); \
if (Z_TYPE_P(c) == IS_LONG) { \
if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_RESOURCE(z_mh)
- Z_PARAM_ZVAL_DEREF_EX(z_still_running, 0, 1)
+ Z_PARAM_ZVAL_DEREF(z_still_running)
ZEND_PARSE_PARAMETERS_END();
if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) {
}
}
- convert_to_long(z_still_running);
- still_running = Z_LVAL_P(z_still_running);
+ still_running = zval_get_long(z_still_running);
error = curl_multi_perform(mh->multi, &still_running);
+ zval_ptr_dtor(z_still_running);
ZVAL_LONG(z_still_running, still_running);
SAVE_CURLM_ERROR(mh, error);
}
/* }}} */
-/* {{{ proto array curl_multi_info_read(resource mh [, long msgs_in_queue])
+/* {{{ proto array curl_multi_info_read(resource mh [, long &msgs_in_queue])
Get information about the current transfers */
PHP_FUNCTION(curl_multi_info_read)
{
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_RESOURCE(z_mh)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zmsgs_in_queue, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zmsgs_in_queue)
ZEND_PARSE_PARAMETERS_END();
if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) {
ZEND_PARSE_PARAMETERS_START(3,3)
Z_PARAM_RESOURCE(z_mh)
Z_PARAM_LONG(options)
- Z_PARAM_ZVAL_DEREF(zvalue)
+ Z_PARAM_ZVAL(zvalue)
ZEND_PARSE_PARAMETERS_END();
if ((mh = (php_curlm *)zend_fetch_resource(Z_RES_P(z_mh), le_curl_multi_handle_name, le_curl_multi_handle)) == NULL) {
ZEND_PARSE_PARAMETERS_START(3,3)
Z_PARAM_RESOURCE(zid)
Z_PARAM_LONG(options)
- Z_PARAM_ZVAL_DEREF(zvalue)
+ Z_PARAM_ZVAL(zvalue)
ZEND_PARSE_PARAMETERS_END();
if ((sh = (php_curlsh *)zend_fetch_resource(Z_RES_P(zid), le_curl_share_handle_name, le_curl_share_handle)) == NULL) {
zend_long depth = PHP_JSON_PARSER_DEFAULT_DEPTH;
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ZVAL_DEREF(parameter)
+ Z_PARAM_ZVAL(parameter)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(options)
Z_PARAM_LONG(depth)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_LONG(attr)
- Z_PARAM_ZVAL_DEREF(value)
+ Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
PDO_DBH_CLEAR_ERR();
ZEND_PARSE_PARAMETERS_START(0, 3)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(how)
- Z_PARAM_ZVAL_DEREF(arg2)
- Z_PARAM_ZVAL_DEREF(ctor_args)
+ Z_PARAM_ZVAL(arg2)
+ Z_PARAM_ZVAL(ctor_args)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (!pdo_stmt_verify_mode(stmt, how, 1)) {
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_LONG(attr)
- Z_PARAM_ZVAL_DEREF_EX(value, 1, 0)
+ Z_PARAM_ZVAL_EX(value, 1, 0)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (!stmt->methods->set_attribute) {
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_STRING(func_name, func_name_len)
- Z_PARAM_ZVAL_DEREF(callback)
+ Z_PARAM_ZVAL(callback)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(argc)
Z_PARAM_LONG(flags)
ZEND_PARSE_PARAMETERS_START(3, 4)
Z_PARAM_STRING(func_name, func_name_len)
- Z_PARAM_ZVAL_DEREF(step_callback)
- Z_PARAM_ZVAL_DEREF(fini_callback)
+ Z_PARAM_ZVAL(step_callback)
+ Z_PARAM_ZVAL(fini_callback)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(argc)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_STRING(collation_name, collation_name_len)
- Z_PARAM_ZVAL_DEREF(callback)
+ Z_PARAM_ZVAL(callback)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
dbh = Z_PDO_DBH_P(getThis());
#endif
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(z_fd)
+ Z_PARAM_ZVAL(z_fd)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
switch (Z_TYPE_P(z_fd)) {
int fd;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(z_fd)
+ Z_PARAM_ZVAL(z_fd)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
switch (Z_TYPE_P(z_fd)) {
Z_PARAM_ARRAY_OR_OBJECT_EX(array, 0, 1)
Z_PARAM_FUNC(BG(array_walk_fci), BG(array_walk_fci_cache))
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_EX(userdata, 0, 1)
+ Z_PARAM_ZVAL(userdata)
ZEND_PARSE_PARAMETERS_END_EX(
BG(array_walk_fci) = orig_array_walk_fci;
BG(array_walk_fci_cache) = orig_array_walk_fci_cache;
Z_PARAM_ARRAY_OR_OBJECT_EX(array, 0, 1)
Z_PARAM_FUNC(BG(array_walk_fci), BG(array_walk_fci_cache))
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(userdata, 0, 1)
+ Z_PARAM_ZVAL(userdata)
ZEND_PARSE_PARAMETERS_END_EX(
BG(array_walk_fci) = orig_array_walk_fci;
BG(array_walk_fci_cache) = orig_array_walk_fci_cache;
Z_PARAM_ARRAY_EX2(var_array_param, 0, 1, 0)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(extract_type)
- Z_PARAM_ZVAL_EX(prefix, 0, 1)
+ Z_PARAM_ZVAL(prefix)
ZEND_PARSE_PARAMETERS_END();
extract_refs = (extract_type & EXTR_REFS);
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_ARRAY(keys)
- Z_PARAM_ZVAL_DEREF(val)
+ Z_PARAM_ZVAL(val)
ZEND_PARSE_PARAMETERS_END();
/* Initialize return array */
double step = 1.0;
ZEND_PARSE_PARAMETERS_START(2, 3)
- Z_PARAM_ZVAL_DEREF(zlow)
- Z_PARAM_ZVAL_DEREF(zhigh)
+ Z_PARAM_ZVAL(zlow)
+ Z_PARAM_ZVAL(zhigh)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(zstep)
+ Z_PARAM_ZVAL(zstep)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (zstep) {
Z_PARAM_LONG(offset)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(length)
- Z_PARAM_ZVAL_DEREF_EX(repl_array, 0, 1)
+ Z_PARAM_ZVAL(repl_array)
ZEND_PARSE_PARAMETERS_END();
num_in = zend_hash_num_elements(Z_ARRVAL_P(array));
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_ARRAY_HT(arr_hash)
- Z_PARAM_ZVAL_DEREF_EX(zcolumn, 1, 0)
+ Z_PARAM_ZVAL_EX(zcolumn, 1, 0)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zkey, 1, 0)
+ Z_PARAM_ZVAL_EX(zkey, 1, 0)
ZEND_PARSE_PARAMETERS_END();
if ((zcolumn && !array_column_param_helper(zcolumn, "column")) ||
ZEND_PARSE_PARAMETERS_START(3, 3)
Z_PARAM_ARRAY(input)
Z_PARAM_LONG(pad_size)
- Z_PARAM_ZVAL_DEREF(pad_value)
+ Z_PARAM_ZVAL(pad_value)
ZEND_PARSE_PARAMETERS_END();
/* Do some initial calculations */
Z_PARAM_ARRAY(input)
Z_PARAM_FUNC(fci, fci_cache)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(initial)
+ Z_PARAM_ZVAL(initial)
ZEND_PARSE_PARAMETERS_END();
}
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(assertion)
+ Z_PARAM_ZVAL(assertion)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(description)
+ Z_PARAM_ZVAL(description)
ZEND_PARSE_PARAMETERS_END();
if (Z_TYPE_P(assertion) == IS_STRING) {
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_LONG(what)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(value)
+ Z_PARAM_ZVAL(value)
ZEND_PARSE_PARAMETERS_END();
switch (what) {
Z_PARAM_STRING(options, options_len)
Z_PARAM_OPTIONAL
Z_PARAM_ARRAY(p_longopts)
- Z_PARAM_ZVAL_DEREF_EX(zoptind, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zoptind)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
/* Init zoptind to 1 */
if (zoptind) {
- zval_dtor(zoptind);
+ zval_ptr_dtor(zoptind);
ZVAL_LONG(zoptind, 1);
}
int old_error_reporting = EG(error_reporting);
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(expr)
+ Z_PARAM_ZVAL(expr)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(i)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
zend_bool do_return = 0;
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(do_return)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
user_tick_function_entry tick_fe;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF_EX(function, 0, 1)
+ Z_PARAM_ZVAL(function)
ZEND_PARSE_PARAMETERS_END();
if (!BG(user_tick_functions)) {
Z_PARAM_STRING(hostname, hostname_len)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(type_param)
- Z_PARAM_ZVAL_DEREF_EX(authns, 1, 1)
- Z_PARAM_ZVAL_DEREF_EX(addtl, 1, 1)
+ Z_PARAM_ZVAL_DEREF_EX(authns, 1, 0)
+ Z_PARAM_ZVAL_DEREF_EX(addtl, 1, 0)
Z_PARAM_BOOL(raw)
ZEND_PARSE_PARAMETERS_END();
if (authns) {
- zval_dtor(authns);
+ zval_ptr_dtor(authns);
array_init(authns);
}
if (addtl) {
- zval_dtor(addtl);
+ zval_ptr_dtor(addtl);
array_init(addtl);
}
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STRING(hostname, hostname_len)
- Z_PARAM_ZVAL_DEREF_EX(mx_list, 0, 1)
+ Z_PARAM_ZVAL_DEREF(mx_list)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(weight_list, 0, 1)
+ Z_PARAM_ZVAL_DEREF(weight_list)
ZEND_PARSE_PARAMETERS_END();
- zval_dtor(mx_list);
+ zval_ptr_dtor(mx_list);
array_init(mx_list);
if (weight_list) {
- zval_dtor(weight_list);
+ zval_ptr_dtor(weight_list);
array_init(weight_list);
}
Z_PARAM_STRING(cmd, cmd_len)
Z_PARAM_OPTIONAL
if (!mode) {
- Z_PARAM_ZVAL_DEREF_EX(ret_array, 0, 1)
+ Z_PARAM_ZVAL_DEREF(ret_array)
}
- Z_PARAM_ZVAL_DEREF_EX(ret_code, 0, 1)
+ Z_PARAM_ZVAL_DEREF(ret_code)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (!cmd_len) {
ret = php_exec(mode, cmd, NULL, return_value);
} else {
if (Z_TYPE_P(ret_array) != IS_ARRAY) {
- zval_dtor(ret_array);
+ zval_ptr_dtor(ret_array);
array_init(ret_array);
+ } else if (Z_REFCOUNT_P(ret_array) > 1) {
+ zval_ptr_dtor(ret_array);
+ ZVAL_ARR(ret_array, zend_array_dup(Z_ARR_P(ret_array)));
}
ret = php_exec(2, cmd, ret_array, return_value);
}
if (ret_code) {
- zval_dtor(ret_code);
+ zval_ptr_dtor(ret_code);
ZVAL_LONG(ret_code, ret);
}
}
Z_PARAM_RESOURCE(res)
Z_PARAM_LONG(operation)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(wouldblock, 0, 1)
+ Z_PARAM_ZVAL_DEREF(wouldblock)
ZEND_PARSE_PARAMETERS_END();
PHP_STREAM_TO_ZVAL(stream, res);
}
if (wouldblock) {
- zval_dtor(wouldblock);
+ zval_ptr_dtor(wouldblock);
ZVAL_LONG(wouldblock, 0);
}
ZEND_PARSE_PARAMETERS_START(2, 4)
Z_PARAM_PATH(filename, filename_len)
- Z_PARAM_ZVAL_DEREF_EX(data, 0, 1)
+ Z_PARAM_ZVAL(data)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(flags)
Z_PARAM_RESOURCE_EX(zcontext, 1, 0)
ZEND_PARSE_PARAMETERS_START(1, 5)
Z_PARAM_RESOURCE(fd)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(len_zv)
+ Z_PARAM_ZVAL(len_zv)
Z_PARAM_STRING(delimiter_str, delimiter_str_len)
Z_PARAM_STRING(enclosure_str, enclosure_str_len)
Z_PARAM_STRING(escape_str, escape_str_len)
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_PATH(filename, filename_len)
- Z_PARAM_ZVAL_DEREF_EX(group, 0, 1)
+ Z_PARAM_ZVAL(group)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
wrapper = php_stream_locate_url_wrapper(filename, NULL, 0);
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_PATH(filename, filename_len)
- Z_PARAM_ZVAL_DEREF_EX(user, 0, 1)
+ Z_PARAM_ZVAL(user)
ZEND_PARSE_PARAMETERS_END();
wrapper = php_stream_locate_url_wrapper(filename, NULL, 0);
Z_PARAM_STRING(host, host_len)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(port)
- Z_PARAM_ZVAL_DEREF_EX(zerrno, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zerrstr, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zerrno)
+ Z_PARAM_ZVAL_DEREF(zerrstr)
Z_PARAM_DOUBLE(timeout)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
tv.tv_usec = conv % 1000000;
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, 0);
}
if (zerrstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_EMPTY_STRING(zerrstr);
}
if (stream == NULL) {
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, err);
}
if (zerrstr && errstr) {
/* no need to dup; we need to efree buf anyway */
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_STR(zerrstr, errstr);
} else if (!zerrstr && errstr) {
zend_string_release(errstr);
ZEND_PARSE_PARAMETERS_START(0, 2)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(arg1, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(arg2, 0, 1)
+ Z_PARAM_ZVAL_DEREF(arg1)
+ Z_PARAM_ZVAL_DEREF(arg2)
ZEND_PARSE_PARAMETERS_END();
if (SG(headers_sent)) {
switch(ZEND_NUM_ARGS()) {
case 2:
- zval_dtor(arg2);
+ zval_ptr_dtor(arg2);
ZVAL_LONG(arg2, line);
case 1:
- zval_dtor(arg1);
+ zval_ptr_dtor(arg1);
if (file) {
ZVAL_STRING(arg1, file);
} else {
zend_long enc_type = PHP_QUERY_RFC1738;
ZEND_PARSE_PARAMETERS_START(1, 4)
- Z_PARAM_ZVAL_DEREF(formdata)
+ Z_PARAM_ZVAL(formdata)
Z_PARAM_OPTIONAL
Z_PARAM_STRING(prefix, prefix_len)
Z_PARAM_STRING(arg_sep, arg_sep_len)
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STRING(input, input_len)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(info, 0, 1)
+ Z_PARAM_ZVAL_DEREF(info)
ZEND_PARSE_PARAMETERS_END();
if (argc == 2) {
- zval_dtor(info);
+ zval_ptr_dtor(info);
array_init(info);
}
double return_val;
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ZVAL_DEREF(value)
+ Z_PARAM_ZVAL(value)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(precision)
Z_PARAM_LONG(mode)
zval *zbase, *zexp;
ZEND_PARSE_PARAMETERS_START(2, 2)
- Z_PARAM_ZVAL_DEREF_EX(zbase, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zexp, 0, 1)
+ Z_PARAM_ZVAL(zbase)
+ Z_PARAM_ZVAL(zexp)
ZEND_PARSE_PARAMETERS_END();
pow_function(return_value, zbase, zexp);
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_string_ex(arg);
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_string_ex(arg);
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_string_ex(arg);
zend_string *result;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_long_ex(arg);
zend_string *result;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_long_ex(arg);
zend_string *result;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
convert_to_long_ex(arg);
zend_string *result;
ZEND_PARSE_PARAMETERS_START(3, 3)
- Z_PARAM_ZVAL_DEREF(number)
+ Z_PARAM_ZVAL(number)
Z_PARAM_LONG(frombase)
Z_PARAM_LONG(tobase)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_START(3, 6)
Z_PARAM_STRING(command, command_len)
Z_PARAM_ARRAY(descriptorspec)
- Z_PARAM_ZVAL_DEREF_EX(pipes, 0, 1)
+ Z_PARAM_ZVAL_DEREF(pipes)
Z_PARAM_OPTIONAL
Z_PARAM_STRING_EX(cwd, cwd_len, 1, 0)
Z_PARAM_ARRAY_EX(environment, 1, 0)
#endif
proc->env = env;
- if (pipes != NULL) {
- zval_dtor(pipes);
- }
-
+ zval_ptr_dtor(pipes);
array_init(pipes);
#if PHP_CAN_DO_PTS
ZEND_PARSE_PARAMETERS_START(1, 6)
Z_PARAM_STR(host)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zerrno, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zerrstr, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zerrno)
+ Z_PARAM_ZVAL_DEREF(zerrstr)
Z_PARAM_DOUBLE(timeout)
Z_PARAM_LONG(flags)
Z_PARAM_RESOURCE(zcontext)
tv.tv_usec = conv % 1000000;
#endif
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, 0);
}
if (zerrstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_EMPTY_STRING(zerrstr);
}
if (stream == NULL) {
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, err);
}
if (zerrstr && errstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_STR(zerrstr, errstr);
} else if (errstr) {
zend_string_release(errstr);
ZEND_PARSE_PARAMETERS_START(1, 5)
Z_PARAM_STRING(host, host_len)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(zerrno, 0, 1)
- Z_PARAM_ZVAL_DEREF_EX(zerrstr, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zerrno)
+ Z_PARAM_ZVAL_DEREF(zerrstr)
Z_PARAM_LONG(flags)
Z_PARAM_RESOURCE(zcontext)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
}
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, 0);
}
if (zerrstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_EMPTY_STRING(zerrstr);
}
if (stream == NULL) {
if (zerrno) {
- zval_dtor(zerrno);
+ zval_ptr_dtor(zerrno);
ZVAL_LONG(zerrno, err);
}
if (zerrstr && errstr) {
- zval_dtor(zerrstr);
+ zval_ptr_dtor(zerrstr);
ZVAL_STR(zerrstr, errstr);
} else if (errstr) {
zend_string_release(errstr);
Z_PARAM_LONG(to_read)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(flags)
- Z_PARAM_ZVAL_DEREF_EX(zremote, 0, 1)
+ Z_PARAM_ZVAL_DEREF(zremote)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
php_stream_from_zval(stream, zstream);
if (zremote) {
- zval_dtor(zremote);
+ zval_ptr_dtor(zremote);
ZVAL_NULL(zremote);
}
Z_PARAM_STRING(filtername, filternamelen)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(read_write)
- Z_PARAM_ZVAL_DEREF(filterparams)
+ Z_PARAM_ZVAL(filterparams)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
php_stream_from_zval(stream, zstream);
php_stream_wrapper *wrapper = NULL;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(zstream)
+ Z_PARAM_ZVAL(zstream)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (Z_TYPE_P(zstream) == IS_RESOURCE) {
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(part)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(part)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(offset)
ZEND_PARSE_PARAMETERS_END();
ZEND_PARSE_PARAMETERS_START(2, 3)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(zneedle)
+ Z_PARAM_ZVAL(zneedle)
Z_PARAM_OPTIONAL
Z_PARAM_LONG(offset)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_STR(haystack)
- Z_PARAM_ZVAL_DEREF(needle)
+ Z_PARAM_ZVAL(needle)
ZEND_PARSE_PARAMETERS_END();
if (Z_TYPE_P(needle) == IS_STRING) {
zval *tmp_str = NULL, *tmp_from = NULL, *tmp_repl = NULL, *tmp_len= NULL;
ZEND_PARSE_PARAMETERS_START(3, 4)
- Z_PARAM_ZVAL_DEREF(str)
- Z_PARAM_ZVAL_DEREF(repl)
- Z_PARAM_ZVAL_DEREF(from)
+ Z_PARAM_ZVAL(str)
+ Z_PARAM_ZVAL(repl)
+ Z_PARAM_ZVAL(from)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(len, 0, 1)
+ Z_PARAM_ZVAL(len)
ZEND_PARSE_PARAMETERS_END();
if (Z_TYPE_P(str) != IS_ARRAY) {
Z_PARAM_STR(t1)
Z_PARAM_STR(t2)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(percent, 0, 1)
+ Z_PARAM_ZVAL_DEREF(percent)
ZEND_PARSE_PARAMETERS_END();
if (ac > 2) {
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STR(str)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF(allow)
+ Z_PARAM_ZVAL(allow)
ZEND_PARSE_PARAMETERS_END();
/* To maintain a certain BC, we allow anything for the second parameter and return original string */
}
/* }}} */
-/* {{{ proto void parse_str(string encoded_string [, array result])
+/* {{{ proto void parse_str(string encoded_string [, array &result])
Parses GET/POST/COOKIE data and sets global variables */
PHP_FUNCTION(parse_str)
{
ZEND_PARSE_PARAMETERS_START(1, 2)
Z_PARAM_STRING(arg, arglen)
Z_PARAM_OPTIONAL
- Z_PARAM_ZVAL_DEREF_EX(arrayArg, 0, 1)
+ Z_PARAM_ZVAL_DEREF(arrayArg)
ZEND_PARSE_PARAMETERS_END();
res = estrndup(arg, arglen);
zend_throw_error(NULL, "Cannot re-assign $this");
}
} else {
- zval ret;
-
/* Clear out the array that was passed in. */
- zval_dtor(arrayArg);
- array_init(&ret);
- sapi_module.treat_data(PARSE_STRING, res, &ret);
- ZVAL_COPY_VALUE(arrayArg, &ret);
+ zval_ptr_dtor(arrayArg);
+ array_init(arrayArg);
+ sapi_module.treat_data(PARSE_STRING, res, arrayArg);
}
}
/* }}} */
zend_string *type;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END();
type = zend_zval_get_type(arg);
}
/* }}} */
-/* {{{ proto bool settype(mixed var, string type)
+/* {{{ proto bool settype(mixed &var, string type)
Set the type of the variable */
PHP_FUNCTION(settype)
{
zval *num;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(num)
+ Z_PARAM_ZVAL(num)
ZEND_PARSE_PARAMETERS_END();
RETURN_DOUBLE(zval_get_double(num));
zval *val;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(val)
+ Z_PARAM_ZVAL(val)
ZEND_PARSE_PARAMETERS_END();
RETURN_BOOL(zend_is_true(val));
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
if (Z_TYPE_P(arg) == type) {
zval *arg;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(arg)
+ Z_PARAM_ZVAL(arg)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
RETURN_BOOL(Z_TYPE_P(arg) == IS_FALSE || Z_TYPE_P(arg) == IS_TRUE);
}
/* }}} */
-/* {{{ proto bool is_callable(mixed var [, bool syntax_only [, string callable_name]])
+/* {{{ proto bool is_callable(mixed var [, bool syntax_only [, string &callable_name]])
Returns true if var is callable. */
PHP_FUNCTION(is_callable)
{
int check_flags = 0;
ZEND_PARSE_PARAMETERS_START(1, 3)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(syntax_only)
- Z_PARAM_ZVAL_DEREF_EX(callable_name, 0, 1)
+ Z_PARAM_ZVAL_DEREF(callable_name)
ZEND_PARSE_PARAMETERS_END();
if (syntax_only) {
}
if (ZEND_NUM_ARGS() > 2) {
retval = zend_is_callable_ex(var, NULL, check_flags, &name, NULL, &error);
- zval_dtor(callable_name);
+ zval_ptr_dtor(callable_name);
ZVAL_STR(callable_name, name);
} else {
retval = zend_is_callable_ex(var, NULL, check_flags, NULL, NULL, &error);
zval *var;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
ZEND_PARSE_PARAMETERS_END();
RETURN_BOOL(zend_is_iterable(var));
php_stream_bucket *bucket;
ZEND_PARSE_PARAMETERS_START(2, 2)
- Z_PARAM_ZVAL_DEREF(zstream)
+ Z_PARAM_ZVAL(zstream)
Z_PARAM_STRING(buffer, buffer_len)
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
smart_str buf = {0};
ZEND_PARSE_PARAMETERS_START(1, 2)
- Z_PARAM_ZVAL_DEREF(var)
+ Z_PARAM_ZVAL(var)
Z_PARAM_OPTIONAL
Z_PARAM_BOOL(return_output)
ZEND_PARSE_PARAMETERS_END();
smart_str buf = {0};
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_ZVAL_DEREF(struc)
+ Z_PARAM_ZVAL(struc)
ZEND_PARSE_PARAMETERS_END();
PHP_VAR_SERIALIZE_INIT(var_hash);