summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>1998-02-03 04:16:50 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 14:56:30 +0000
commit85aff5773f2412a54180cc35f86370c56b65bf77 (patch)
tree58aa1481b34d450e99d317950157b92887658fa2 /sv.c
parente1c148c28bf3335bbd0ad9a2070b0917265c00c3 (diff)
downloadperl-85aff5773f2412a54180cc35f86370c56b65bf77.tar.gz
Some Chip patches (some tweaked to match _5x source):
Subject: [PATCH] local leakage Date: Tue, 3 Feb 1998 09:16:50 -0500 (EST) Subject: [PATCH] NULs in patterns Date: Wed, 4 Feb 1998 01:33:51 -0500 (EST) Subject: [PATCH] Configure on PerlIO Date: Wed, 4 Feb 1998 01:38:43 -0500 (EST) Subject: [PATCH] Avoid core dump on package alias Date: Wed, 4 Feb 1998 15:38:42 -0500 (EST) Subject: [PATCH] Fix name of $Foo::{'Bar::'} Date: Wed, 4 Feb 1998 16:37:51 -0500 (EST) p4raw-id: //depot/perl@462
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 5b37d72df5..38c0411156 100644
--- a/sv.c
+++ b/sv.c
@@ -1916,7 +1916,7 @@ sv_setsv(SV *dstr, register SV *sstr)
STRLEN len = GvNAMELEN(sstr);
sv_upgrade(dstr, SVt_PVGV);
sv_magic(dstr, dstr, '*', name, len);
- GvSTASH(dstr) = GvSTASH(sstr);
+ GvSTASH(dstr) = (HV*)SvREFCNT_inc(GvSTASH(sstr));
GvNAME(dstr) = savepvn(name, len);
GvNAMELEN(dstr) = len;
SvFAKE_on(dstr); /* can coerce to non-glob */
@@ -2699,6 +2699,7 @@ sv_clear(register SV *sv)
case SVt_PVGV:
gp_free((GV*)sv);
Safefree(GvNAME(sv));
+ SvREFCNT_dec(GvSTASH(sv));
/* FALL THROUGH */
case SVt_PVLV:
case SVt_PVMG: