summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-05-30 18:35:34 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-05-30 18:35:34 +0000
commitd76cede9154d51f41507d717ae2bce97adb6e387 (patch)
tree06c93c24046293802c3aae3720ea515d402ac216
parentb9ef47ef57f4dfeaad3cd9a1278b1cd9c02d5116 (diff)
parentea2f84a302630d2e72764455e0be657ac02fbb9c (diff)
downloadperl-d76cede9154d51f41507d717ae2bce97adb6e387.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@6165
-rw-r--r--op.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/op.c b/op.c
index 6e77fde587..c7da1c58eb 100644
--- a/op.c
+++ b/op.c
@@ -784,6 +784,7 @@ S_op_clear(pTHX_ OP *o)
cSVOPo->op_sv = Nullsv;
#endif
break;
+ case OP_METHOD_NAMED:
case OP_CONST:
SvREFCNT_dec(cSVOPo->op_sv);
cSVOPo->op_sv = Nullsv;
@@ -4648,8 +4649,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
if (!PL_beginav)
PL_beginav = newAV();
DEBUG_x( dump_sub(gv) );
- av_push(PL_beginav, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_push(PL_beginav, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
call_list(oldscope, PL_beginav);
PL_curcop = &PL_compiling;
@@ -4661,8 +4662,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
PL_endav = newAV();
DEBUG_x( dump_sub(gv) );
av_unshift(PL_endav, 1);
- av_store(PL_endav, 0, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_store(PL_endav, 0, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
else if (strEQ(s, "CHECK") && !PL_error_count) {
if (!PL_checkav)
@@ -4671,8 +4672,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
if (PL_main_start && ckWARN(WARN_VOID))
Perl_warner(aTHX_ WARN_VOID, "Too late to run CHECK block");
av_unshift(PL_checkav, 1);
- av_store(PL_checkav, 0, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_store(PL_checkav, 0, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
else if (strEQ(s, "INIT") && !PL_error_count) {
if (!PL_initav)
@@ -4680,8 +4681,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
DEBUG_x( dump_sub(gv) );
if (PL_main_start && ckWARN(WARN_VOID))
Perl_warner(aTHX_ WARN_VOID, "Too late to run INIT block");
- av_push(PL_initav, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_push(PL_initav, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
}
@@ -4807,15 +4808,15 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename)
if (strEQ(s, "BEGIN")) {
if (!PL_beginav)
PL_beginav = newAV();
- av_push(PL_beginav, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_push(PL_beginav, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
else if (strEQ(s, "END")) {
if (!PL_endav)
PL_endav = newAV();
av_unshift(PL_endav, 1);
- av_store(PL_endav, 0, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_store(PL_endav, 0, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
else if (strEQ(s, "CHECK")) {
if (!PL_checkav)
@@ -4823,16 +4824,16 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename)
if (PL_main_start && ckWARN(WARN_VOID))
Perl_warner(aTHX_ WARN_VOID, "Too late to run CHECK block");
av_unshift(PL_checkav, 1);
- av_store(PL_checkav, 0, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_store(PL_checkav, 0, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
else if (strEQ(s, "INIT")) {
if (!PL_initav)
PL_initav = newAV();
if (PL_main_start && ckWARN(WARN_VOID))
Perl_warner(aTHX_ WARN_VOID, "Too late to run INIT block");
- av_push(PL_initav, SvREFCNT_inc(cv));
- GvCV(gv) = 0;
+ av_push(PL_initav, (SV*)cv);
+ GvCV(gv) = 0; /* cv has been hijacked */
}
}
else