diff options
author | Vincent Pit <perl@profvince.com> | 2011-06-25 14:28:12 +0200 |
---|---|---|
committer | Vincent Pit <perl@profvince.com> | 2011-06-26 00:07:29 +0200 |
commit | f02ea43cac371ecb59188f9654a0d99fd54db862 (patch) | |
tree | b54079d020f546fb03c7c680e490d848a36637c2 /pp_ctl.c | |
parent | 2b9a64577b41d2e4715e02f855894f80e1e293e8 (diff) | |
download | perl-f02ea43cac371ecb59188f9654a0d99fd54db862.tar.gz |
Convert pp_leave() to adjust_stack_on_leave()
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 27 |
1 files changed, 1 insertions, 26 deletions
@@ -2126,32 +2126,7 @@ PP(pp_leave) gimme = OP_GIMME(PL_op, (cxstack_ix >= 0) ? gimme : G_SCALAR); TAINT_NOT; - if (gimme == G_VOID) - SP = newsp; - else if (gimme == G_SCALAR) { - register SV **mark; - MARK = newsp + 1; - if (MARK <= SP) { - if (SvFLAGS(TOPs) & (SVs_PADTMP|SVs_TEMP)) - *MARK = TOPs; - else - *MARK = sv_mortalcopy(TOPs); - } else { - MEXTEND(mark,0); - *MARK = &PL_sv_undef; - } - SP = MARK; - } - else if (gimme == G_ARRAY) { - /* in case LEAVE wipes old return values */ - register SV **mark; - for (mark = newsp + 1; mark <= SP; mark++) { - if (!(SvFLAGS(*mark) & (SVs_PADTMP|SVs_TEMP))) { - *mark = sv_mortalcopy(*mark); - TAINT_NOT; /* Each item is independent */ - } - } - } + SP = adjust_stack_on_leave(newsp, SP, newsp, gimme, SVs_PADTMP|SVs_TEMP); PL_curpm = newpm; /* Don't pop $1 et al till now */ LEAVE_with_name("block"); |