diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2003-08-24 16:52:00 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-08-26 19:13:39 +0000 |
commit | 5dd42e15760f2e77ab3979bfe1b6aafaa9ff1227 (patch) | |
tree | 0afca94ca8522b7c1ac1afeea67258cd0ce57290 /pp_ctl.c | |
parent | d7f1a795527ad4875d71a2e977851f754d4b7b3f (diff) | |
download | perl-5dd42e15760f2e77ab3979bfe1b6aafaa9ff1227.tar.gz |
improved 19064 (local $_[0] problems)
Message-ID: <20030824145159.GA12210@fdgroup.com>
p4raw-id: //depot/perl@20909
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1883,6 +1883,7 @@ PP(pp_return) switch (CxTYPE(cx)) { case CXt_SUB: popsub2 = TRUE; + cxstack_ix++; /* preserve cx entry on stack for use by POPSUB */ break; case CXt_EVAL: if (!(PL_in_eval & EVAL_KEEPERR)) @@ -1942,15 +1943,16 @@ PP(pp_return) } PL_stack_sp = newsp; + LEAVE; /* Stack values are safe: */ if (popsub2) { + cxstack_ix--; POPSUB(cx,sv); /* release CV and @_ ... */ } else sv = Nullsv; PL_curpm = newpm; /* ... and pop $1 et al */ - LEAVE; LEAVESUB(sv); if (clear_errsv) sv_setpv(ERRSV,""); @@ -1985,6 +1987,7 @@ PP(pp_last) dounwind(cxix); POPBLOCK(cx,newpm); + cxstack_ix++; /* temporarily protect top context */ mark = newsp; switch (CxTYPE(cx)) { case CXt_LOOP: @@ -2026,6 +2029,8 @@ PP(pp_last) SP = newsp; PUTBACK; + LEAVE; + cxstack_ix--; /* Stack values are safe: */ switch (pop2) { case CXt_LOOP: @@ -2038,7 +2043,6 @@ PP(pp_last) } PL_curpm = newpm; /* ... and pop $1 et al */ - LEAVE; LEAVESUB(sv); return nextop; } |