}
#endif /* !ptable_fetch */
-STATIC void PTABLE_PREFIX(_delete)(pPTBL_ const ptable * const t, const void * const key) {
- ptable_ent *const ent = ptable_find(t, key);
-
- if (ent) {
- void *val = ent->val;
- PTABLE_VAL_FREE(val);
- ent->val = NULL;
- }
-}
-
#ifndef ptable_split
STATIC void ptable_split(pPTBLMS_ ptable * const t) {
#define ptable_split(T) ptable_split(aPTBLMS_ (T))
void *oldval = ent->val;
PTABLE_VAL_FREE(oldval);
ent->val = val;
- } else {
+ } else if (val) {
const UV i = PTABLE_HASH(key) & t->max;
ent = PerlMemShared_malloc(sizeof *ent);
ent->key = key;