summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1997-11-05 11:22:34 -0600
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-08 14:17:10 +0000
commit246699ca5e3af04fcf52cf11c1535421dd986e59 (patch)
tree6e3d40d548d2d8ffb7c14a6c3558932520740be1 /op.c
parent74c7603757455e9ae40e2976bf9b439d7ba8be55 (diff)
downloadperl-246699ca5e3af04fcf52cf11c1535421dd986e59.tar.gz
(Retracted by #11223.)
Subject: [PATCH] Re: Problem with Safe.pm and Perl 5.004 Message-Id: <3460FFBA.6DA51F46@ti.com> p4raw-id: //depot/perl@11212
Diffstat (limited to 'op.c')
-rw-r--r--op.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/op.c b/op.c
index bb288a3576..3daba0d295 100644
--- a/op.c
+++ b/op.c
@@ -4202,6 +4202,7 @@ Perl_cv_undef(pTHX_ CV *cv)
SvREFCNT_dec((SV*)CvXSUBANY(cv).any_ptr);
CvCONST_off(cv);
}
+ CvDEFSTASH(cv) = Nullhv;
if (CvPADLIST(cv)) {
/* may be during global destruction */
if (SvREFCNT(CvPADLIST(cv))) {
@@ -4319,6 +4320,7 @@ S_cv_clone2(pTHX_ CV *proto, CV *outside)
CvGV(cv) = CvGV(proto);
CvSTASH(cv) = CvSTASH(proto);
CvROOT(cv) = OpREFCNT_inc(CvROOT(proto));
+ CvDEFSTASH(cv) = CvDEFSTASH(proto);
CvSTART(cv) = CvSTART(proto);
if (outside)
CvOUTSIDE(cv) = (CV*)SvREFCNT_inc(outside);
@@ -4710,6 +4712,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
}
cv_undef(cv);
CvFLAGS(cv) = CvFLAGS(PL_compcv);
+ CvDEFSTASH(cv) = CvDEFSTASH(PL_compcv);
CvOUTSIDE(cv) = CvOUTSIDE(PL_compcv);
CvOUTSIDE(PL_compcv) = 0;
CvPADLIST(cv) = CvPADLIST(PL_compcv);
@@ -5045,6 +5048,7 @@ Perl_newXS(pTHX_ char *name, XSUBADDR_t subaddr, char *filename)
CvFILE(cv) = filename; /* NOTE: not copied, as it is expected to be
an external constant string */
CvXSUB(cv) = subaddr;
+ CvDEFSTASH(cv) = PL_defstash;
if (name) {
char *s = strrchr(name,':');