summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-12-30 21:32:36 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-12-30 21:32:36 +0000
commit5089c844b09b4bf70ddcc69a1b2c187381eabf0c (patch)
tree9fbd94983a1232305f15a2f045780153c11cdfc8 /gv.c
parentc9ce37aecd0e1f7271370137e323df19ca939619 (diff)
downloadperl-5089c844b09b4bf70ddcc69a1b2c187381eabf0c.tar.gz
change#4705 breaks code that interpolates $], so leave string value
of $] as it was for compatibility (and perhaps introduce $^V or similar for the utf8 representation, maybe?) p4raw-link: @4705 on //depot/utfperl: a7cb1f9979dd83ab32266dc555f72f0939829c3f p4raw-id: //depot/perl@4742
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gv.c b/gv.c
index e2c63497ce..30d8f1e1e2 100644
--- a/gv.c
+++ b/gv.c
@@ -812,8 +812,11 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
case ']':
if (len == 1) {
SV *sv = GvSV(gv);
- GvSV(gv) = SvREFCNT_inc(PL_patchlevel);
- SvREFCNT_dec(sv);
+ (void)SvUPGRADE(sv, SVt_PVNV);
+ SvNVX(sv) = SvNVX(PL_patchlevel);
+ SvNOK_on(sv);
+ (void)SvPV_nolen(sv);
+ SvREADONLY_on(sv);
}
break;
}