p4raw-id: //depot/perl@29790
S_hfreeentries(pTHX_ HV *hv)
{
/* This is the array that we're going to restore */
- HE **orig_array;
+ HE **const orig_array = HvARRAY(hv);
HEK *name;
int attempts = 100;
- if (!HvARRAY(hv))
+ if (!orig_array)
return;
if (SvOOK(hv)) {
name = NULL;
}
- orig_array = HvARRAY(hv);
/* orig_array remains unchanged throughout the loop. If after freeing all
the entries it turns out that one of the little blighters has triggered
an action that has caused HvARRAY to be re-allocated, then we set