summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-20 11:44:07 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-20 18:15:17 -0800
commit3905af2ed3037224909d47a2e5a14940cd14cb22 (patch)
treeeaf780f4d0386c5ca589f2907f733ce6f29ae594 /hv.c
parent13ca76ffd95cc6e92506a7d4201b24f653b3e3d8 (diff)
downloadperl-3905af2ed3037224909d47a2e5a14940cd14cb22.tar.gz
S_hfreeentries: keep OOK off unless adding something to aux
This small optimisation allows hv_undef to skips its if(SvOOK()) block and all the checks inside it much of the time.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index 376b5dcf49..fb9dfec1be 100644
--- a/hv.c
+++ b/hv.c
@@ -1803,7 +1803,7 @@ S_hfreeentries(pTHX_ HV *hv)
HvARRAY(hv) = orig_array;
- if (has_aux)
+ if (has_aux && current_aux)
SvFLAGS(hv) |= SVf_OOK;
else
SvFLAGS(hv) &=~SVf_OOK;