diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2014-03-10 12:29:56 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2014-03-10 12:29:56 +0000 |
commit | 5d27ee4af18b0f3857a1f951f91473c86da29b62 (patch) | |
tree | 3fffd7c64edcf05e2583b122301c1880ecc50514 /hv.c | |
parent | 6e2e048be95a027035f83c0f673f8de94e013c87 (diff) | |
download | perl-5d27ee4af18b0f3857a1f951f91473c86da29b62.tar.gz |
don't repeatedly call HvUSEDKEYS
HvUSEDKEYS contains a function call nowadays. Don't call it repeatedly.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1625,8 +1625,10 @@ S_clear_placeholders(pTHX_ HV *hv, U32 items) if (--items == 0) { /* Finished. */ - HvTOTALKEYS(hv) -= (IV)HvPLACEHOLDERS_get(hv); - if (HvUSEDKEYS(hv) == 0) + I32 placeholders = HvPLACEHOLDERS_get(hv); + HvTOTALKEYS(hv) -= (IV)placeholders; + /* HvUSEDKEYS expanded */ + if ((HvTOTALKEYS(hv) - placeholders) == 0) HvHASKFLAGS_off(hv); HvPLACEHOLDERS_set(hv, 0); return; |