summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-06-30 14:34:42 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-07-02 08:44:07 -0700
commitb4b0692a73a016eba05a78e6c2e9a5eae7862567 (patch)
treeadf964067eadc8a5d831710da0783d4ec3c19261 /pp.c
parent21dfaeec9eaa0c5068d6829b007077e6ca0d637a (diff)
downloadperl-b4b0692a73a016eba05a78e6c2e9a5eae7862567.tar.gz
Use find_runcv_where for pp_coreargs and pp_runcv
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/pp.c b/pp.c
index 0324c19aaa..661c055ffa 100644
--- a/pp.c
+++ b/pp.c
@@ -5797,16 +5797,9 @@ PP(pp_coreargs)
case OA_SCALAR:
try_defsv:
if (!numargs && defgv && whicharg == minargs + 1) {
- PERL_SI * const oldsi = PL_curstackinfo;
- I32 const oldcxix = oldsi->si_cxix;
- CV *caller;
- if (oldcxix) oldsi->si_cxix--;
- else PL_curstackinfo = oldsi->si_prev;
- caller = find_runcv(NULL);
- PL_curstackinfo = oldsi;
- oldsi->si_cxix = oldcxix;
PUSHs(find_rundefsv2(
- caller,cxstack[cxstack_ix].blk_oldcop->cop_seq
+ find_runcv_where(FIND_RUNCV_level_eq, (void *)1, NULL),
+ cxstack[cxstack_ix].blk_oldcop->cop_seq
));
}
else PUSHs(numargs ? svp && *svp ? *svp : &PL_sv_undef : NULL);
@@ -5894,13 +5887,7 @@ PP(pp_runcv)
dSP;
CV *cv;
if (PL_op->op_private & OPpOFFBYONE) {
- PERL_SI * const oldsi = PL_curstackinfo;
- I32 const oldcxix = oldsi->si_cxix;
- if (oldcxix) oldsi->si_cxix--;
- else PL_curstackinfo = oldsi->si_prev;
- cv = find_runcv(NULL);
- PL_curstackinfo = oldsi;
- oldsi->si_cxix = oldcxix;
+ cv = find_runcv_where(FIND_RUNCV_level_eq, (void *)1, NULL);
}
else cv = find_runcv(NULL);
XPUSHs(CvEVAL(cv) ? &PL_sv_undef : sv_2mortal(newRV((SV *)cv)));