diff options
author | Dmitry Stogov <dmitry@zend.com> | 2017-09-20 02:25:56 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2017-09-20 02:25:56 +0300 |
commit | 44e0b79ac64b344fc1335c126e548f00d8308602 (patch) | |
tree | bcfc582b0d7a46b9798498fcb163079c7b9b8750 /Zend/zend_operators.c | |
parent | c1dc10aaa5249ba54b6fa5bc043a80bd96f1c9e7 (diff) | |
download | php-git-44e0b79ac64b344fc1335c126e548f00d8308602.tar.gz |
Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r-- | Zend/zend_operators.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 200857558e..e14ad11f00 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -581,8 +581,7 @@ static void convert_scalar_to_array(zval *op) /* {{{ */ ZVAL_COPY_VALUE(&entry, op); - ZVAL_NEW_ARR(op); - zend_hash_init(Z_ARRVAL_P(op), 8, NULL, ZVAL_PTR_DTOR, 0); + array_init_size(op, 1); zend_hash_index_add_new(Z_ARRVAL_P(op), 0, &entry); } /* }}} */ @@ -632,8 +631,7 @@ try_again: } break; case IS_NULL: - ZVAL_NEW_ARR(op); - zend_hash_init(Z_ARRVAL_P(op), 8, NULL, ZVAL_PTR_DTOR, 0); + array_init(op); break; case IS_REFERENCE: zend_unwrap_reference(op); |