From e0171a1a31b0610ebdf32920b0159c22c37e4691 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Tue, 10 May 2011 19:06:45 +0100 Subject: add hfree_next_entry(), hv_free_ent_ret() Move body of hfreeentries()' central loop into a new function, hfree_next_entry(); leaving hfreeentries() as a simple loop that calls hfree_next_entry() until there are no entries left. This will in future allow sv_clear() to free a hash iteratively rather than recursively. Similarly, turn hv_free_ent() into a thin wrapper around a new function, hv_free_ent_ret(), which doesn't free HeVAL(), but rather just returns the SV instead. --- embed.h | 1 + 1 file changed, 1 insertion(+) (limited to 'embed.h') diff --git a/embed.h b/embed.h index 9ff64404f6..b545bd3b5f 100644 --- a/embed.h +++ b/embed.h @@ -1286,6 +1286,7 @@ #define hsplit(a) S_hsplit(aTHX_ a) #define hv_auxinit S_hv_auxinit #define hv_delete_common(a,b,c,d,e,f,g) S_hv_delete_common(aTHX_ a,b,c,d,e,f,g) +#define hv_free_ent_ret(a,b) S_hv_free_ent_ret(aTHX_ a,b) #define hv_magic_check S_hv_magic_check #define hv_notallowed(a,b,c,d) S_hv_notallowed(aTHX_ a,b,c,d) #define new_he() S_new_he(aTHX) -- cgit v1.2.1