This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Plan C rough edge smoothing - forgot to turn on the "has key flags"
authorNicholas Clark <nick@ccl4.org>
Fri, 17 Oct 2003 18:44:28 +0000 (18:44 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 17 Oct 2003 18:44:28 +0000 (18:44 +0000)
flag on the hash when rehashing. Can turn off the "rehasing" flag
if the hash is cleared

p4raw-id: //depot/perl@21474

hv.c

diff --git a/hv.c b/hv.c
index 58799d5..b786b32 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1532,6 +1532,7 @@ S_hsplit(pTHX_ HV *hv)
     xhv->xhv_fill = 0;
     HvSHAREKEYS_off(hv);
     HvREHASH_on(hv);
+    HvHASKFLAGS_on(hv);
 
     aep = (HE **) xhv->xhv_array;
 
@@ -1854,6 +1855,7 @@ Perl_hv_clear(pTHX_ HV *hv)
        mg_clear((SV*)hv);
 
     HvHASKFLAGS_off(hv);
+    HvREHASH_off(hv);
 }
 
 STATIC void