p4raw-id: //depot/perl@2214
newHVhv(HV *ohv)
{
register HV *hv;
- register XPVHV* xhv;
STRLEN hv_max = ohv ? HvMAX(ohv) : 0;
STRLEN hv_fill = ohv ? HvFILL(ohv) : 0;
hv = newHV();
while (hv_max && hv_max + 1 >= hv_fill * 2)
hv_max = hv_max / 2; /* Is always 2^n-1 */
- ((XPVHV*)SvANY(hv))->xhv_max = hv_max;
+ HvMAX(hv) = hv_max;
if (!hv_fill)
return hv;
HE *hv_eiter = HvEITER(ohv); /* current entry of iterator */
/* Slow way */
- hv_iterinit(hv);
+ hv_iterinit(ohv);
while (entry = hv_iternext(ohv)) {
hv_store(hv, HeKEY(entry), HeKLEN(entry),
SvREFCNT_inc(HeVAL(entry)), HeHASH(entry));