Tweaks related to issue #311

This commit is contained in:
rfm 2024-07-15 17:19:16 +01:00
parent b91ff38636
commit 4629a4e1f6
5 changed files with 30 additions and 21 deletions

View file

@ -82,9 +82,11 @@ typedef GSIMapNode_t *GSIMapNode;
#define GSI_MAP_KTYPES GSUNION_PTR | GSUNION_OBJ
#define GSI_MAP_VTYPES GSUNION_PTR | GSUNION_OBJ
#define IS_WEAK_KEY(M) \
M->cb.pf.k.options & (NSPointerFunctionsZeroingWeakMemory | NSPointerFunctionsWeakMemory)
(memoryType(M->cb.pf.k.options, NSPointerFunctionsZeroingWeakMemory) \
|| memoryType(M->cb.pf.k.options, NSPointerFunctionsWeakMemory))
#define IS_WEAK_VALUE(M) \
M->cb.pf.v.options & (NSPointerFunctionsZeroingWeakMemory | NSPointerFunctionsWeakMemory)
(memoryType(M->cb.pf.v.options, NSPointerFunctionsZeroingWeakMemory) \
|| memoryType(M->cb.pf.v.options, NSPointerFunctionsWeakMemory))
#define GSI_MAP_HASH(M, X)\
(M->legacy ? M->cb.old.k.hash(M, X.ptr) \
: pointerFunctionsHash(&M->cb.pf.k, X.ptr))