]> granicus.if.org Git - php/commitdiff
Avoid useless dereferences and separations during paramter passing.
authorDmitry Stogov <dmitry@zend.com>
Mon, 19 Jun 2017 09:55:59 +0000 (12:55 +0300)
committerDmitry Stogov <dmitry@zend.com>
Mon, 19 Jun 2017 09:55:59 +0000 (12:55 +0300)
26 files changed:
ext/ctype/ctype.c
ext/curl/multi.c
ext/curl/share.c
ext/json/json.c
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/pdo_sqlite/sqlite_driver.c
ext/posix/posix.c
ext/standard/array.c
ext/standard/assert.c
ext/standard/basic_functions.c
ext/standard/dns.c
ext/standard/exec.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/fsock.c
ext/standard/head.c
ext/standard/http.c
ext/standard/image.c
ext/standard/math.c
ext/standard/proc_open.c
ext/standard/streamsfuncs.c
ext/standard/string.c
ext/standard/type.c
ext/standard/user_filters.c
ext/standard/var.c

index f5d7ac35fac76890bc3417a82ccf18889caf8970..9b8abe6b06c46dd95b2cf575e66969e5ae51b780 100644 (file)
@@ -145,7 +145,7 @@ static PHP_MINFO_FUNCTION(ctype)
 #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) { \
index 1bb95a2a61daa7d3ab370b44de5994a2de85e766..322fd823f421246e258a616c5cf047dc172dfe3f 100644 (file)
@@ -254,7 +254,7 @@ PHP_FUNCTION(curl_multi_exec)
 
        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) {
@@ -277,9 +277,9 @@ PHP_FUNCTION(curl_multi_exec)
                }
        }
 
-       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);
@@ -314,7 +314,7 @@ PHP_FUNCTION(curl_multi_getcontent)
 }
 /* }}} */
 
-/* {{{ 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)
 {
@@ -327,7 +327,7 @@ 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) {
@@ -608,7 +608,7 @@ PHP_FUNCTION(curl_multi_setopt)
        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) {
index 4bbeff70db0b3d966345e26372a851f46571fd99..d5ce75d239d2348bee45c58ed3bb56fa36cc05bf 100644 (file)
@@ -107,7 +107,7 @@ PHP_FUNCTION(curl_share_setopt)
        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) {
index 9803f48a3a050094ca13214261056e17159782c1..9c930ee1bc95c7b6f4af7e9ed759c7b5affaf2bb 100644 (file)
@@ -227,7 +227,7 @@ static PHP_FUNCTION(json_encode)
        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)
index cb5f1e1bc3d3158747e519bcd813d827e31fa6f3..afca2d1cfb06c673b39f09845ede652e93698cf0 100644 (file)
@@ -832,7 +832,7 @@ static PHP_METHOD(PDO, setAttribute)
 
        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();
index d0e3d7a41dd4af8c1377e0d1e5af1be850cc5cea..c238ea0fb01eb0bc56cd77630a3e211af5517ab6 100644 (file)
@@ -1377,8 +1377,8 @@ static PHP_METHOD(PDOStatement, fetchAll)
        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)) {
@@ -1699,7 +1699,7 @@ static PHP_METHOD(PDOStatement, setAttribute)
 
        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) {
index 1e3e071fef7db464c2e8c2f47ddf041cf277c09c..fed9dbed2f4c5ba9416d9b2f2324bf2ac80a505e 100644 (file)
@@ -522,7 +522,7 @@ static PHP_METHOD(SQLite, sqliteCreateFunction)
 
        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)
@@ -595,8 +595,8 @@ static PHP_METHOD(SQLite, sqliteCreateAggregate)
 
        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);
@@ -658,7 +658,7 @@ static PHP_METHOD(SQLite, sqliteCreateCollation)
 
        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());
index f8fe406ea36fdfc387faa50643c68b6889bd00c6..bb23a5bc2983506c20a1ca7b530527177192d0d3 100644 (file)
@@ -795,7 +795,7 @@ PHP_FUNCTION(posix_ttyname)
 #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)) {
@@ -840,7 +840,7 @@ PHP_FUNCTION(posix_isatty)
        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)) {
index e44f1ed4e7672297374c45b1b899df66b7887b92..7055b2c86bfcf9355f7f13255eadb37c61f5c4f4 100644 (file)
@@ -1513,7 +1513,7 @@ PHP_FUNCTION(array_walk)
                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;
@@ -1543,7 +1543,7 @@ PHP_FUNCTION(array_walk_recursive)
                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;
@@ -2470,7 +2470,7 @@ PHP_FUNCTION(extract)
                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);
@@ -2711,7 +2711,7 @@ PHP_FUNCTION(array_fill_keys)
 
        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 */
@@ -2762,10 +2762,10 @@ PHP_FUNCTION(range)
        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) {
@@ -3472,7 +3472,7 @@ PHP_FUNCTION(array_splice)
                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));
@@ -4164,9 +4164,9 @@ PHP_FUNCTION(array_column)
 
        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")) ||
@@ -4297,7 +4297,7 @@ PHP_FUNCTION(array_pad)
        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 */
@@ -5864,7 +5864,7 @@ PHP_FUNCTION(array_reduce)
                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();
 
 
index 850fb824e236c53df9b91769ed353121ceb82ac8..87462185a8ae85d3f02744512f1aa811c9fc3ff5 100644 (file)
@@ -158,9 +158,9 @@ PHP_FUNCTION(assert)
        }
 
        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) {
@@ -297,7 +297,7 @@ PHP_FUNCTION(assert_options)
        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) {
index 79d08e4efc1e317211696baff08f15fc7702ae7e..8f73153bbaf3f02edac09c36149fec2cf60a1a74 100644 (file)
@@ -4306,12 +4306,12 @@ PHP_FUNCTION(getopt)
                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);
        }
 
@@ -5278,7 +5278,7 @@ PHP_FUNCTION(highlight_string)
        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);
@@ -5572,7 +5572,7 @@ PHP_FUNCTION(print_r)
        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);
@@ -5805,7 +5805,7 @@ PHP_FUNCTION(unregister_tick_function)
        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)) {
index 93cc2f8f906f4db6cab7cf17bf563c757a944406..58f214f2c756fa192e587f6ff331013cf8bac262 100644 (file)
@@ -808,17 +808,17 @@ PHP_FUNCTION(dns_get_record)
                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);
        }
 
@@ -1041,16 +1041,16 @@ PHP_FUNCTION(dns_get_mx)
 
        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);
        }
 
index 08f51cf3b5af0b48974662420375c7bfc14d5c20..1e70021674a93c54eda63b803dba02d30d67380c 100644 (file)
@@ -217,9 +217,9 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
                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) {
@@ -235,13 +235,16 @@ static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
                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);
        }
 }
index c2711225bd75f752321a79ddf5210d49f544e11f..d82c2c513e928bac578e10cf28bc33aa63bd1df4 100644 (file)
@@ -341,7 +341,7 @@ PHP_FUNCTION(flock)
                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);
@@ -353,7 +353,7 @@ PHP_FUNCTION(flock)
        }
 
        if (wouldblock) {
-               zval_dtor(wouldblock);
+               zval_ptr_dtor(wouldblock);
                ZVAL_LONG(wouldblock, 0);
        }
 
@@ -591,7 +591,7 @@ PHP_FUNCTION(file_put_contents)
 
        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)
@@ -2008,7 +2008,7 @@ PHP_FUNCTION(fgetcsv)
                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)
index f51892b5102a25fc4e273de21672928fd500336f..b0d6a9813fddff68fa066b71a811b64f94e57c5d 100644 (file)
@@ -339,7 +339,7 @@ static void php_do_chgrp(INTERNAL_FUNCTION_PARAMETERS, int do_lchgrp) /* {{{ */
 
        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);
@@ -475,7 +475,7 @@ static void php_do_chown(INTERNAL_FUNCTION_PARAMETERS, int do_lchown) /* {{{ */
 
        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);
index e29e6bf0a8957063ca6f917ce9c2603d04cba492..1605a84398813115f8793c93f7354e40c44b76e3 100644 (file)
@@ -55,8 +55,8 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                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);
 
@@ -82,11 +82,11 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        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);
        }
 
@@ -106,12 +106,12 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 
        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);
index b8632c70edbd714086a9abd1d5b391971722dc75..81d229d4c8307bee90b877dfcf35bc4783c58347 100644 (file)
@@ -258,8 +258,8 @@ PHP_FUNCTION(headers_sent)
 
        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)) {
@@ -269,10 +269,10 @@ PHP_FUNCTION(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 {
index 9a8f7fd20cf4dbdda74a8f89378a8c1c2634a761..e270342c7bb263b98bdec8dc8a4f2313c666f37b 100644 (file)
@@ -233,7 +233,7 @@ PHP_FUNCTION(http_build_query)
        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)
index d15fd3323aaf1c260a0fe40b5aab697792988d26..9deb5a8a7401bcd21a5ce63bcf17345cd76933aa 100644 (file)
@@ -1475,11 +1475,11 @@ static void php_getimagesize_from_any(INTERNAL_FUNCTION_PARAMETERS, int mode) {
        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);
        }
 
index 794128be6c51eaac2f1eec0670725b98821a35c9..6f7bede332ace85094c9b9b0f418be36b0357415 100644 (file)
@@ -363,7 +363,7 @@ PHP_FUNCTION(round)
        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)
@@ -627,8 +627,8 @@ PHP_FUNCTION(pow)
        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);
@@ -983,7 +983,7 @@ PHP_FUNCTION(bindec)
        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);
@@ -1000,7 +1000,7 @@ PHP_FUNCTION(hexdec)
        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);
@@ -1017,7 +1017,7 @@ PHP_FUNCTION(octdec)
        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);
@@ -1035,7 +1035,7 @@ PHP_FUNCTION(decbin)
        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);
@@ -1052,7 +1052,7 @@ PHP_FUNCTION(decoct)
        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);
@@ -1069,7 +1069,7 @@ PHP_FUNCTION(dechex)
        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);
@@ -1087,7 +1087,7 @@ PHP_FUNCTION(base_convert)
        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();
index 6d048091c5a4c3db2c609ea1c34122b3e9cea134..539d2c5b695ba1fe6a83010142a29e648777f234 100644 (file)
@@ -448,7 +448,7 @@ PHP_FUNCTION(proc_open)
        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)
@@ -874,10 +874,7 @@ PHP_FUNCTION(proc_open)
 #endif
        proc->env = env;
 
-       if (pipes != NULL) {
-               zval_dtor(pipes);
-       }
-
+       zval_ptr_dtor(pipes);
        array_init(pipes);
 
 #if PHP_CAN_DO_PTS
index 783b354984b7e90ae9ef32740fbaf30a240fae16..475fb060be420329846e51e7a5ac0c2a2f87a97d 100644 (file)
@@ -109,8 +109,8 @@ PHP_FUNCTION(stream_socket_client)
        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)
@@ -132,11 +132,11 @@ PHP_FUNCTION(stream_socket_client)
        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);
        }
 
@@ -160,11 +160,11 @@ PHP_FUNCTION(stream_socket_client)
 
        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);
@@ -199,8 +199,8 @@ PHP_FUNCTION(stream_socket_server)
        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);
@@ -212,11 +212,11 @@ PHP_FUNCTION(stream_socket_server)
        }
 
        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);
        }
 
@@ -230,11 +230,11 @@ PHP_FUNCTION(stream_socket_server)
 
        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);
@@ -389,13 +389,13 @@ PHP_FUNCTION(stream_socket_recvfrom)
                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);
        }
 
@@ -1176,7 +1176,7 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS)
                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);
@@ -1577,7 +1577,7 @@ PHP_FUNCTION(stream_is_local)
        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) {
index b740779b66b4d9b8c44ace78e928880975605b46..6ffc2ae2bb023f2edd8e5e4ed03bbac14b604802 100644 (file)
@@ -1851,7 +1851,7 @@ PHP_FUNCTION(stristr)
 
        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();
@@ -1906,7 +1906,7 @@ PHP_FUNCTION(strstr)
 
        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();
@@ -2011,7 +2011,7 @@ PHP_FUNCTION(stripos)
 
        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();
@@ -2142,7 +2142,7 @@ PHP_FUNCTION(strripos)
 
        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);
@@ -2248,7 +2248,7 @@ PHP_FUNCTION(strrchr)
 
        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) {
@@ -2457,11 +2457,11 @@ PHP_FUNCTION(substr_replace)
        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) {
@@ -3588,7 +3588,7 @@ PHP_FUNCTION(similar_text)
                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) {
@@ -4449,7 +4449,7 @@ PHP_FUNCTION(strip_tags)
        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 */
@@ -4556,7 +4556,7 @@ PHP_FUNCTION(setlocale)
 }
 /* }}} */
 
-/* {{{ 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)
 {
@@ -4568,7 +4568,7 @@ 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);
@@ -4590,13 +4590,10 @@ PHP_FUNCTION(parse_str)
                        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);
        }
 }
 /* }}} */
index 1df5a63eccd552cebaf4011e573ebcf961cc7d2a..e290c9ddd55948ffcd25d9a121431acbb7f95317 100644 (file)
@@ -29,7 +29,7 @@ PHP_FUNCTION(gettype)
        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);
@@ -41,7 +41,7 @@ PHP_FUNCTION(gettype)
 }
 /* }}} */
 
-/* {{{ proto bool settype(mixed var, string type)
+/* {{{ proto bool settype(mixed &var, string type)
    Set the type of the variable */
 PHP_FUNCTION(settype)
 {
@@ -155,7 +155,7 @@ PHP_FUNCTION(floatval)
        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));
@@ -169,7 +169,7 @@ PHP_FUNCTION(boolval)
        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));
@@ -195,7 +195,7 @@ static inline void php_is_type(INTERNAL_FUNCTION_PARAMETERS, int 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);
 
        if (Z_TYPE_P(arg) == type) {
@@ -238,7 +238,7 @@ PHP_FUNCTION(is_bool)
        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);
@@ -347,7 +347,7 @@ PHP_FUNCTION(is_scalar)
 }
 /* }}} */
 
-/* {{{ 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)
 {
@@ -359,10 +359,10 @@ 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) {
@@ -370,7 +370,7 @@ PHP_FUNCTION(is_callable)
        }
        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);
@@ -391,7 +391,7 @@ PHP_FUNCTION(is_iterable)
        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));
index b0205094d9bc7aa3d9fbfe93b5024c0a00f291ab..4d9f4f5fbb0be5e835f2ef29d450cc4c29064af8 100644 (file)
@@ -502,7 +502,7 @@ PHP_FUNCTION(stream_bucket_new)
        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);
 
index d6d17c2ec6d09a05b07119dbc2081f0f61fab549..0ae79914129259357cc730016b3b1f771e13d848 100644 (file)
@@ -573,7 +573,7 @@ PHP_FUNCTION(var_export)
        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();
@@ -1024,7 +1024,7 @@ PHP_FUNCTION(serialize)
        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);