From: Benjamin Sugars Date: Fri, 20 Apr 2001 10:30:20 +0000 (-0400) Subject: Re: C considered harmful X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5fd80ba51c060a4acde9dc2bfc91963099b7978f;p=p5sagit%2Fp5-mst-13.2.git Re: C considered harmful Message-ID: except the part that increases the refcount of PL_stderrgv, already fixed separately. p4raw-id: //depot/perl@26043 --- diff --git a/perl.c b/perl.c index 4a15b0c..25755cc 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);