fix pInternalPointer for xc_hash_copy_if
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1171 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
parent
2f460a1052
commit
f177b8e65f
|
@ -573,9 +573,6 @@ void xc_hash_copy_if(HashTable *target, HashTable *source, copy_ctor_func_t pCop
|
|||
p = source->pListHead;
|
||||
while (p) {
|
||||
if (checker(p->pData)) {
|
||||
if (setTargetPointer && source->pInternalPointer == p) {
|
||||
target->pInternalPointer = NULL;
|
||||
}
|
||||
if (p->nKeyLength) {
|
||||
zend_u_hash_quick_update(target, p->key.type, ZSTR(BUCKET_KEY_S(p)), p->nKeyLength, p->h, p->pData, size, &new_entry);
|
||||
} else {
|
||||
|
@ -584,6 +581,9 @@ void xc_hash_copy_if(HashTable *target, HashTable *source, copy_ctor_func_t pCop
|
|||
if (pCopyConstructor) {
|
||||
pCopyConstructor(new_entry);
|
||||
}
|
||||
if (setTargetPointer && source->pInternalPointer == p) {
|
||||
target->pInternalPointer = new_entry;
|
||||
}
|
||||
}
|
||||
p = p->pListNext;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue