diff options
author | David Mitchell <davem@iabyn.com> | 2012-11-13 11:15:01 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-11-15 22:41:07 +0000 |
commit | 7d6c2cef76517581274f186d3ceb1c30fda45208 (patch) | |
tree | 9096bd303b47de5f261b14c8eee7e99c5a26a996 /pp_hot.c | |
parent | 25e3aa3332bf90bf0b2b8dd3e9a7762d9da4fe8f (diff) | |
download | perl-7d6c2cef76517581274f186d3ceb1c30fda45208.tar.gz |
pp_iter: move var declarations to narrower scope
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1897,10 +1897,8 @@ PP(pp_iter) { dVAR; dSP; PERL_CONTEXT *cx; - SV *sv, *oldsv; + SV *oldsv; SV **itersvp; - AV *av = NULL; /* used for LOOP_FOR on arrays and the stack */ - bool av_is_stack = FALSE; EXTEND(SP, 1); cx = &cxstack[cxstack_ix]; @@ -1967,9 +1965,13 @@ PP(pp_iter) break; case CXt_LOOP_FOR: + { /* iterate array */ - av = cx->blk_loop.state_u.ary.ary; + AV *av = cx->blk_loop.state_u.ary.ary; + SV *sv; + bool av_is_stack = FALSE; + if (!av) { av_is_stack = TRUE; av = PL_curstack; @@ -2026,6 +2028,7 @@ PP(pp_iter) *itersvp = sv; SvREFCNT_dec(oldsv); break; + } default: DIE(aTHX_ "panic: pp_iter, type=%u", CxTYPE(cx)); |