summaryrefslogtreecommitdiff
path: root/Zend/zend_objects.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-09-20 02:25:56 +0300
committerDmitry Stogov <dmitry@zend.com>2017-09-20 02:25:56 +0300
commit44e0b79ac64b344fc1335c126e548f00d8308602 (patch)
treebcfc582b0d7a46b9798498fcb163079c7b9b8750 /Zend/zend_objects.c
parentc1dc10aaa5249ba54b6fa5bc043a80bd96f1c9e7 (diff)
downloadphp-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_objects.c')
-rw-r--r--Zend/zend_objects.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index d5c375f6ed..123e5db238 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -197,8 +197,7 @@ ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object *o
zend_string *key;
if (!new_object->properties) {
- ALLOC_HASHTABLE(new_object->properties);
- zend_hash_init(new_object->properties, zend_hash_num_elements(old_object->properties), NULL, ZVAL_PTR_DTOR, 0);
+ new_object->properties = zend_new_array(zend_hash_num_elements(old_object->properties));
zend_hash_real_init(new_object->properties, 0);
} else {
zend_hash_extend(new_object->properties, new_object->properties->nNumUsed + zend_hash_num_elements(old_object->properties), 0);