This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add hfree_next_entry(), hv_free_ent_ret()
authorDavid Mitchell <davem@iabyn.com>
Tue, 10 May 2011 18:06:45 +0000 (19:06 +0100)
committerDavid Mitchell <davem@iabyn.com>
Thu, 19 May 2011 13:49:43 +0000 (14:49 +0100)
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.


No differences found