From: Vincent Pit Date: Sat, 20 Sep 2008 21:49:20 +0000 (+0200) Subject: Allocate context hash iterators as soon as they are created X-Git-Tag: v0.20~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=7fe688dd66af2d55e8dae3d7a350cc05905dc988;p=perl%2Fmodules%2FVariable-Magic.git Allocate context hash iterators as soon as they are created --- diff --git a/Magic.xs b/Magic.xs index cbd65dc..ce1c4b3 100644 --- a/Magic.xs +++ b/Magic.xs @@ -794,6 +794,7 @@ BOOT: HV *stash; MY_CXT_INIT; MY_CXT.wizz = newHV(); + hv_iterinit(MY_CXT.wizz); /* Allocate iterator */ MY_CXT.count = 0; stash = gv_stashpv(__PACKAGE__, 1); newCONSTSUB(stash, "SIG_MIN", newSVuv(SIG_MIN)); @@ -826,6 +827,7 @@ CODE: dMY_CXT; count = MY_CXT.count; hv = newHV(); + hv_iterinit(hv); /* Allocate iterator */ hv_iterinit(MY_CXT.wizz); while (key = hv_iternext(MY_CXT.wizz)) { STRLEN len;