From 44e0b79ac64b344fc1335c126e548f00d8308602 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 20 Sep 2017 02:25:56 +0300 Subject: 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. --- Zend/zend_operators.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Zend/zend_operators.c') 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); -- cgit v1.2.1