diff options
author | Dmitry Stogov <dmitry@php.net> | 2006-10-03 11:10:33 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2006-10-03 11:10:33 +0000 |
commit | c1ad451c3e70459787b61add4445141594659955 (patch) | |
tree | f8399dd5714492a03a3cccba944e4c8454d5d070 /Zend/zend_variables.c | |
parent | 7c78500d9663ba98508f42eef97ae7b596ea9e1a (diff) | |
download | php-git-c1ad451c3e70459787b61add4445141594659955.tar.gz |
Speedup array/HashTable copying. (Matt W)
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r-- | Zend/zend_variables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index ca24c3d6fb..0b7143ac4b 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -130,7 +130,7 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC) return; /* do nothing */ } ALLOC_HASHTABLE_REL(tmp_ht); - zend_hash_init(tmp_ht, 0, NULL, ZVAL_PTR_DTOR, 0); + zend_hash_init(tmp_ht, zend_hash_num_elements(original_ht), NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); zvalue->value.ht = tmp_ht; } |