s |void |hsplit |NN HV *hv
s |void |hfreeentries |HV *hv
sa |HE* |new_he
-s |void |del_he |NN HE *p
sa |HEK* |save_hek_flags |NN const char *str|I32 len|U32 hash|int flags
s |void |hv_magic_check |NN HV *hv|NN bool *needs_copy|NN bool *needs_store
s |void |unshare_hek_or_pvn|NULLOK const HEK* hek|NULLOK const char* str|I32 len|U32 hash
#define hsplit S_hsplit
#define hfreeentries S_hfreeentries
#define new_he S_new_he
-#define del_he S_del_he
#define save_hek_flags S_save_hek_flags
#define hv_magic_check S_hv_magic_check
#define unshare_hek_or_pvn S_unshare_hek_or_pvn
#define hsplit(a) S_hsplit(aTHX_ a)
#define hfreeentries(a) S_hfreeentries(aTHX_ a)
#define new_he() S_new_he(aTHX)
-#define del_he(a) S_del_he(aTHX_ a)
#define save_hek_flags(a,b,c,d) S_save_hek_flags(aTHX_ a,b,c,d)
#define hv_magic_check(a,b,c) S_hv_magic_check(aTHX_ a,b,c)
#define unshare_hek_or_pvn(a,b,c,d) S_unshare_hek_or_pvn(aTHX_ a,b,c,d)
HeNEXT(he) = 0;
}
+#ifdef PURIFY
+
+#define new_HE() (HE*)safemalloc(sizeof(HE))
+#define del_HE(p) safefree((char*)p)
+
+#else
+
STATIC HE*
S_new_he(pTHX)
{
return he;
}
-STATIC void
-S_del_he(pTHX_ HE *p)
-{
- LOCK_SV_MUTEX;
- HeNEXT(p) = (HE*)PL_he_root;
- PL_he_root = p;
- UNLOCK_SV_MUTEX;
-}
-
-#ifdef PURIFY
-
-#define new_HE() (HE*)safemalloc(sizeof(HE))
-#define del_HE(p) safefree((char*)p)
+#define new_HE() new_he()
+#define del_HE(p) \
+ STMT_START { \
+ LOCK_SV_MUTEX; \
+ HeNEXT(p) = (HE*)PL_he_root; \
+ PL_he_root = p; \
+ UNLOCK_SV_MUTEX; \
+ } STMT_END
-#else
-#define new_HE() new_he()
-#define del_HE(p) del_he(p)
#endif
__attribute__malloc__
__attribute__warn_unused_result__;
-STATIC void S_del_he(pTHX_ HE *p)
- __attribute__nonnull__(pTHX_1);
-
STATIC HEK* S_save_hek_flags(pTHX_ const char *str, I32 len, U32 hash, int flags)
__attribute__malloc__
__attribute__warn_unused_result__