summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2006-11-08 16:02:03 +0000
committerDmitry Stogov <dmitry@php.net>2006-11-08 16:02:03 +0000
commitcc895444b12f158ccd07f0a950979c8be7df5e6c (patch)
tree2f357bd2b138e1d958a94d070ae5eab127511581
parent41ae8de13666d13d73387f4e8c88920abb9e3a7f (diff)
downloadphp-git-cc895444b12f158ccd07f0a950979c8be7df5e6c.tar.gz
HashTable copying optimization (Matt Wilmas)
-rw-r--r--Zend/zend_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index ee92abc2df..96f16a29db 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -773,7 +773,7 @@ ZEND_API void zend_hash_copy(HashTable *target, HashTable *source, copy_ctor_fun
p = source->pListHead;
while (p) {
if (p->nKeyLength) {
- zend_hash_update(target, p->arKey, p->nKeyLength, p->pData, size, &new_entry);
+ zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &new_entry);
} else {
zend_hash_index_update(target, p->h, p->pData, size, &new_entry);
}
@@ -798,7 +798,7 @@ ZEND_API void _zend_hash_merge(HashTable *target, HashTable *source, copy_ctor_f
p = source->pListHead;
while (p) {
if (p->nKeyLength>0) {
- if (_zend_hash_add_or_update(target, p->arKey, p->nKeyLength, p->pData, size, &t, mode ZEND_FILE_LINE_RELAY_CC)==SUCCESS && pCopyConstructor) {
+ if (_zend_hash_quick_add_or_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t, mode ZEND_FILE_LINE_RELAY_CC)==SUCCESS && pCopyConstructor) {
pCopyConstructor(t);
}
} else {