]> granicus.if.org Git - php/commitdiff
Use new macros
authorXinchen Hui <laruence@php.net>
Wed, 8 Apr 2015 06:30:47 +0000 (14:30 +0800)
committerXinchen Hui <laruence@php.net>
Wed, 8 Apr 2015 06:30:47 +0000 (14:30 +0800)
Zend/zend_builtin_functions.c
ext/soap/soap.c
ext/spl/spl_array.c
ext/standard/array.c
ext/standard/browscap.c

index ffb78c343e39fa7749f18830704d00a71f2c7d58..c7d12bf1285435d5cae14b84d32728277665bef4 100644 (file)
@@ -1144,7 +1144,7 @@ ZEND_FUNCTION(get_object_vars)
 
        if (!zobj->ce->default_properties_count && properties == zobj->properties) {
                /* fast copy */
-               ZVAL_ARR(return_value, zend_array_dup(properties));
+               RETURN_ARR(zend_array_dup(properties));
        } else {
                array_init_size(return_value, zend_hash_num_elements(properties));
 
@@ -1902,7 +1902,7 @@ ZEND_FUNCTION(get_defined_vars)
 {
        zend_array *symbol_table = zend_rebuild_symbol_table();
 
-       ZVAL_ARR(return_value, zend_array_dup(symbol_table));
+       RETURN_ARR(zend_array_dup(symbol_table));
 }
 /* }}} */
 
index a452b631f376b358b196c3a8b68afa5a87175964..4d6a8ff2fb3031b69a44f9a88197c1e945074bbf 100644 (file)
@@ -3182,7 +3182,7 @@ PHP_METHOD(SoapClient, __getCookies)
 
        if ((cookies = zend_hash_str_find(Z_OBJPROP_P(getThis()), "_cookies", sizeof("_cookies")-1)) != NULL &&
            Z_TYPE_P(cookies) == IS_ARRAY) {
-               ZVAL_ARR(return_value, zend_array_dup(Z_ARRVAL_P(cookies)));
+               RETURN_ARR(zend_array_dup(Z_ARRVAL_P(cookies)));
        } else {
                array_init(return_value);
        }
index a919d4bb5ef988227cb3112f8ec463db54310c6f..5f6d43990df201618c98117e680de2d56030b86c 100644 (file)
@@ -825,7 +825,7 @@ SPL_METHOD(Array, getArrayCopy)
        zval *object = getThis();
        spl_array_object *intern = Z_SPLARRAY_P(object);
 
-       ZVAL_ARR(return_value, zend_array_dup(spl_array_get_hash_table(intern, 0)));
+       RETURN_ARR(zend_array_dup(spl_array_get_hash_table(intern, 0)));
 } /* }}} */
 
 static HashTable *spl_array_get_properties(zval *object) /* {{{ */
@@ -1317,7 +1317,7 @@ SPL_METHOD(Array, exchangeArray)
        zval *object = getThis(), *array;
        spl_array_object *intern = Z_SPLARRAY_P(object);
 
-       ZVAL_ARR(return_value, zend_array_dup(spl_array_get_hash_table(intern, 0)));
+       RETVAL_ARR(zend_array_dup(spl_array_get_hash_table(intern, 0)));
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &array) == FAILURE) {
                return;
        }
index 536771c53d8cf9b6ce5bab751b2e9b48e37c477e..311f4f272d1dda53556f5c33c6e7602e68f959c2 100644 (file)
@@ -3313,7 +3313,7 @@ PHP_FUNCTION(array_unique)
 
        php_set_compare_func(sort_type);
 
-       ZVAL_ARR(return_value, zend_array_dup(Z_ARRVAL_P(array)));
+       RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(array)));
 
        if (Z_ARRVAL_P(array)->nNumOfElements <= 1) {   /* nothing to do */
                return;
@@ -3668,7 +3668,7 @@ static void php_array_intersect(INTERNAL_FUNCTION_PARAMETERS, int behavior, int
        }
 
        /* copy the argument array */
-       ZVAL_ARR(return_value, zend_array_dup(Z_ARRVAL(args[0])));
+       RETVAL_ARR(zend_array_dup(Z_ARRVAL(args[0])));
 
        /* go through the lists and look for common values */
        while (Z_TYPE(ptrs[0]->val) != IS_UNDEF) {
@@ -4087,7 +4087,7 @@ static void php_array_diff(INTERNAL_FUNCTION_PARAMETERS, int behavior, int data_
        }
 
        /* copy the argument array */
-       ZVAL_ARR(return_value, zend_array_dup(Z_ARRVAL(args[0])));
+       RETVAL_ARR(zend_array_dup(Z_ARRVAL(args[0])));
 
        /* go through the lists and look for values of ptr[0] that are not in the others */
        while (Z_TYPE(ptrs[0]->val) != IS_UNDEF) {
index bbb145668aeba43a5261b7a9628b7c3452452347..c04307f1c9c4fb48d3e7731680738ff8adfe71e3 100644 (file)
@@ -488,7 +488,7 @@ PHP_FUNCTION(get_browser)
        }
 
        if (return_array) {
-               ZVAL_ARR(return_value, zend_array_dup(Z_ARRVAL_P(agent)));
+               RETVAL_ARR(zend_array_dup(Z_ARRVAL_P(agent)));
        }
        else {
                object_init(return_value);