hash/map table and pointer functions fixups

This commit is contained in:
rfm 2024-11-12 12:03:24 +00:00
parent c981920679
commit b78b2e2030
8 changed files with 290 additions and 89 deletions

View file

@ -182,7 +182,6 @@ pointerFunctionsEqual(PFInfo *PF, void *item1, void *item2)
static inline void
pointerFunctionsRelinquish(PFInfo *PF, void **itemptr)
{
if (PF->relinquishFunction != 0)
(*PF->relinquishFunction)(*itemptr, PF->sizeFunction);
if (memoryType(PF->options, NSPointerFunctionsWeakMemory))
@ -203,7 +202,7 @@ pointerFunctionsReplace(PFInfo *PF, void **dst, void *src)
if (PF->relinquishFunction != 0)
(*PF->relinquishFunction)(*dst, PF->sizeFunction);
if (memoryType(PF->options, NSPointerFunctionsWeakMemory))
WEAK_WRITE(dst, 0);
WEAK_WRITE(dst, src);
else
*dst = src;
}