summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-12-03 16:37:16 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-03 17:22:08 +0000
commit3510b4a1c70ec95b37a6a1ef86c5555610f0dc75 (patch)
tree97cf7f0e7587e069f777ededc38b1e6862d47850 /sv.c
parent7cae2445f8ea3c3758a465c9737cde17e55be1a6 (diff)
downloadperl-3510b4a1c70ec95b37a6a1ef86c5555610f0dc75.tar.gz
shared hash keys and ++/--
Message-ID: <20011203163716.C21702@plum.flirble.org> p4raw-id: //depot/perl@13442
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index b1da4a8ee5..fcabd8e5c4 100644
--- a/sv.c
+++ b/sv.c
@@ -5846,6 +5846,8 @@ Perl_sv_inc(pTHX_ register SV *sv)
if (SvGMAGICAL(sv))
mg_get(sv);
if (SvTHINKFIRST(sv)) {
+ if (SvREADONLY(sv) && SvFAKE(sv))
+ sv_force_normal(sv);
if (SvREADONLY(sv)) {
if (PL_curcop != &PL_compiling)
Perl_croak(aTHX_ PL_no_modify);
@@ -6000,6 +6002,8 @@ Perl_sv_dec(pTHX_ register SV *sv)
if (SvGMAGICAL(sv))
mg_get(sv);
if (SvTHINKFIRST(sv)) {
+ if (SvREADONLY(sv) && SvFAKE(sv))
+ sv_force_normal(sv);
if (SvREADONLY(sv)) {
if (PL_curcop != &PL_compiling)
Perl_croak(aTHX_ PL_no_modify);