summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-25 19:23:58 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-25 19:23:58 +0000
commit1ba6ee2b6ffb90b7d229bcee46bded6dda6b3bcc (patch)
treea13a13beae8049211a412cce5206dccd24673251 /pp_ctl.c
parentfaee740f668b7b35a18577bc0b2150b66dd521ec (diff)
downloadperl-1ba6ee2b6ffb90b7d229bcee46bded6dda6b3bcc.tar.gz
change#4849 wasn't restoring savestack correctly; make loops that have
continue blocks recognizable at run time p4raw-link: @4849 on //depot/perl: 872465582bf743a066e1240f2c3e941735674827 p4raw-id: //depot/perl@5255
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 308c824b17..552359258b 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1983,17 +1983,14 @@ PP(pp_next)
if (cxix < cxstack_ix)
dounwind(cxix);
- cx = &cxstack[cxstack_ix];
- {
- OP *nextop = cx->blk_loop.next_op;
- /* clean scope, but only if there's no continue block */
- if (nextop == cUNOPx(cx->blk_loop.last_op)->op_first->op_next) {
- TOPBLOCK(cx);
- oldsave = PL_scopestack[PL_scopestack_ix - 1];
- LEAVE_SCOPE(oldsave);
- }
- return nextop;
+ TOPBLOCK(cx);
+
+ /* clean scope, but only if there's no continue block */
+ if (!(cx->blk_loop.last_op->op_private & OPpLOOP_CONTINUE)) {
+ oldsave = PL_scopestack[PL_scopestack_ix - 1];
+ LEAVE_SCOPE(oldsave);
}
+ return cx->blk_loop.next_op;
}
PP(pp_redo)