summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorBenjamin Sugars <bsugars@canoe.ca>2001-04-20 06:30:20 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-11-08 10:11:55 +0000
commit5fd80ba51c060a4acde9dc2bfc91963099b7978f (patch)
treec10ffbeab749d7943297e150bddb9cb0544d8dbd /perl.c
parentc7588fc88ab985cc29451d84e8d3ffca69f9337d (diff)
downloadperl-5fd80ba51c060a4acde9dc2bfc91963099b7978f.tar.gz
Re: C<undef %::> considered harmful
Message-ID: <Pine.LNX.4.21.0104201022040.1722-100000@marmot.rim.canoe.ca> except the part that increases the refcount of PL_stderrgv, already fixed separately. p4raw-id: //depot/perl@26043
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 4a15b0c9ec..25755cc075 100644
--- a/perl.c
+++ b/perl.c
@@ -3440,11 +3440,14 @@ S_init_main_stash(pTHX)
SvREADONLY_on(gv);
hv_name_set(PL_defstash, "main", 4, 0);
PL_incgv = gv_HVadd(gv_AVadd(gv_fetchpv("INC",TRUE, SVt_PVAV)));
+ SvREFCNT_inc(PL_incgv); /* Don't allow it to be freed */
GvMULTI_on(PL_incgv);
PL_hintgv = gv_fetchpv("\010",TRUE, SVt_PV); /* ^H */
GvMULTI_on(PL_hintgv);
PL_defgv = gv_fetchpv("_",TRUE, SVt_PVAV);
+ SvREFCNT_inc(PL_defgv);
PL_errgv = gv_HVadd(gv_fetchpv("@", TRUE, SVt_PV));
+ SvREFCNT_inc(PL_errgv);
GvMULTI_on(PL_errgv);
PL_replgv = gv_fetchpv("\022", TRUE, SVt_PV); /* ^R */
GvMULTI_on(PL_replgv);