[Jifty-commit] r5455 - B
Jifty commits
jifty-commit at lists.jifty.org
Sat May 10 16:21:28 EDT 2008
Author: clkao
Date: Sat May 10 16:21:27 2008
New Revision: 5455
Modified:
B/B.xs
Log:
parent_op and return_op.
Modified: B/B.xs
==============================================================================
--- B/B.xs (original)
+++ B/B.xs Sat May 10 16:21:27 2008
@@ -185,15 +185,22 @@
{
PERL_CONTEXT *cx = upcontext(aTHX_ uplevel);
if (!cx) TOO_FAR;
- return (OP*) cx->blk_oldcop;
-
#if HAS_RETSTACK
return PL_retstack[cx->blk_oldretsp - 1];
#else
- return cx->blk_sub.retop;
+ return (OP*) cx->blk_sub.retop;
#endif
}
+OP*
+find_oldcop(pTHX_ I32 uplevel)
+{
+ PERL_CONTEXT *cx = upcontext(aTHX_ uplevel);
+ if (!cx) TOO_FAR;
+ return (OP*) cx->blk_oldcop;
+}
+
+
static opclass
cc_opclass(pTHX_ const OP *o)
{
@@ -314,7 +321,7 @@
char *type = 0;
IV iv;
dMY_CXT;
-
+
for (iv = 0; iv < sizeof(specialsv_list)/sizeof(SV*); iv++) {
if (sv == specialsv_list[iv]) {
type = "B::SPECIAL";
@@ -842,6 +849,13 @@
B::OP
OP_parent_op(I32 uplevel)
CODE:
+ RETVAL = find_oldcop(aTHX_ uplevel);
+ OUTPUT:
+ RETVAL
+
+B::OP
+OP_return_op(I32 uplevel)
+ CODE:
RETVAL = find_return_op(aTHX_ uplevel);
OUTPUT:
RETVAL
@@ -1760,6 +1774,8 @@
(*(XPVCV*)SvANY(new)) = (*(XPVCV*)SvANY(cv));
CvROOT(new) = root;
CvSTART(new) = start;
+ SvREFCNT_inc(CvPADLIST(new));
+ SvREFCNT_inc(new);
RETVAL = new;
OUTPUT:
RETVAL
More information about the Jifty-commit
mailing list