diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-10-21 18:53:01 +0000 |
---|---|---|
committer | Nicholas Clark <nicholas.clark@humanstate.com> | 2022-03-19 07:30:44 +0100 |
commit | 5983026606b07a11e381fbd9fca44a9e1fa7d497 (patch) | |
tree | 51e07e32a3380fb7edd8a5ae1ad1b03cdea7fff6 /pp_sys.c | |
parent | 2c94601f0901d6917656208a57091e83be9bf07a (diff) | |
download | perl-5983026606b07a11e381fbd9fca44a9e1fa7d497.tar.gz |
Drop the unused hv argument from S_hv_free_ent_ret()
In turn, this means that the hv argument to Perl_hv_free_ent() and
Perl_hv_delayfree_ent() is now clearly unused, so mark it as such. Both
functions are deemed to be API, so unlike the static function
S_hv_free_ent_ret we can't simply change their parameters.
However, change all the internal callers to pass NULL instead of the hv, as
this makes it obvious that the function does not read hv, and might cause
the compiler to generate better code.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -874,7 +874,7 @@ PP(pp_tie) methname = "TIEHASH"; if (HvLAZYDEL(varsv) && (entry = HvEITER_get((HV *)varsv))) { HvLAZYDEL_off(varsv); - hv_free_ent((HV *)varsv, entry); + hv_free_ent(NULL, entry); } HvEITER_set(MUTABLE_HV(varsv), 0); HvRITER_set(MUTABLE_HV(varsv), -1); @@ -1036,7 +1036,7 @@ PP(pp_untie) HE *entry; if (HvLAZYDEL(sv) && (entry = HvEITER_get((HV *)sv))) { HvLAZYDEL_off(sv); - hv_free_ent((HV *)sv, entry); + hv_free_ent(NULL, entry); HvEITER_set(MUTABLE_HV(sv), 0); } } |