diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-17 20:06:23 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-17 20:06:23 +0000 |
commit | d42935ef34d556a685dfe8f03d2f6053a0b554ee (patch) | |
tree | 8e30259df8207ced3269a87b80979d57a8b9ff9f /pp_hot.c | |
parent | 026b9da668ef80098c6605ecf2edb65546562c4e (diff) | |
download | perl-d42935ef34d556a685dfe8f03d2f6053a0b554ee.tar.gz |
Integrate #10145 from maintperl.
fix for ID 20010515.004 (needs test)
p4raw-id: //depot/perl@10148
p4raw-integrated: from //depot/maint-5.6/perl@10147 'merge in' pp_hot.c
(@10091..)
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1812,9 +1812,17 @@ PP(pp_iter) SvREFCNT_dec(*itersvp); - if ((sv = SvMAGICAL(av) - ? *av_fetch(av, ++cx->blk_loop.iterix, FALSE) - : AvARRAY(av)[++cx->blk_loop.iterix])) + if (SvMAGICAL(av) || AvREIFY(av)) { + SV **svp = av_fetch(av, ++cx->blk_loop.iterix, FALSE); + if (svp) + sv = *svp; + else + sv = Nullsv; + } + else { + sv = AvARRAY(av)[++cx->blk_loop.iterix]; + } + if (sv) SvTEMP_off(sv); else sv = &PL_sv_undef; |