summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorJohn Tobey <jtobey@john-edwin-tobey.org>2000-10-26 18:29:53 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-27 12:02:21 +0000
commit9a049f1cf9621e9452adfdde3610ef7c3583b41a (patch)
tree05e5929e5a02e6610291ad84dbb6f332f981c776 /op.c
parent5e66d4f1f8d408decca63565193d2b1424d52c7c (diff)
downloadperl-9a049f1cf9621e9452adfdde3610ef7c3583b41a.tar.gz
Re: [PATCH bleadperl] ripples from constsub patch
Message-Id: <m13ozHF-000FObC@feynman.localnet> p4raw-id: //depot/perl@7455
Diffstat (limited to 'op.c')
-rw-r--r--op.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/op.c b/op.c
index 1aa558ee65..7d07da8c91 100644
--- a/op.c
+++ b/op.c
@@ -4406,6 +4406,8 @@ Perl_op_const_sv(pTHX_ OP *o, CV *cv)
return sv;
if (type == OP_NEXTSTATE || type == OP_NULL || type == OP_PUSHMARK)
continue;
+ if (type == OP_DBSTATE)
+ continue;
if (type == OP_LEAVESUB || type == OP_RETURN)
break;
if (sv)
@@ -6585,7 +6587,7 @@ Perl_peep(pTHX_ register OP *o)
PADOFFSET ix = pad_alloc(OP_CONST, SVs_PADTMP);
if (SvPADTMP(cSVOPo->op_sv)) {
/* If op_sv is already a PADTMP then it is being used by
- * another pad, so make a copy. */
+ * some pad, so make a copy. */
sv_setsv(PL_curpad[ix],cSVOPo->op_sv);
SvREADONLY_on(PL_curpad[ix]);
SvREFCNT_dec(cSVOPo->op_sv);
@@ -6594,6 +6596,8 @@ Perl_peep(pTHX_ register OP *o)
SvREFCNT_dec(PL_curpad[ix]);
SvPADTMP_on(cSVOPo->op_sv);
PL_curpad[ix] = cSVOPo->op_sv;
+ /* XXX I don't know how this isn't readonly already. */
+ SvREADONLY_on(PL_curpad[ix]);
}
cSVOPo->op_sv = Nullsv;
o->op_targ = ix;
@@ -6916,6 +6920,7 @@ static void
const_sv_xsub(pTHXo_ CV* cv)
{
dXSARGS;
- ST(0) = sv_2mortal(newSVsv((SV*)XSANY.any_ptr));
+ EXTEND(sp, 1);
+ ST(0) = sv_2mortal(SvREFCNT_inc((SV*)XSANY.any_ptr));
XSRETURN(1);
}