diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-10-28 10:43:44 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-10-28 10:43:44 +0000 |
commit | 47deb5e7d69449fbaa65f4bd4f42d66014743a75 (patch) | |
tree | 06884f8920a2c729003f7e18a5fbb0a6b82a1e6d /sv.c | |
parent | 9fa20d2e5c4ac5c0a29bf5c019c23698a7d2c57d (diff) | |
download | perl-47deb5e7d69449fbaa65f4bd4f42d66014743a75.tar.gz |
Fix for sv_2iv() on "shared" value from keys %hash.
p4raw-id: //depot/perl@7464
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1497,6 +1497,9 @@ Perl_sv_2iv(pTHX_ register SV *sv) return SvIV(tmpstr); return PTR2IV(SvRV(sv)); } + if (SvREADONLY(sv) && SvFAKE(sv)) { + sv_force_normal(sv); + } if (SvREADONLY(sv) && !SvOK(sv)) { dTHR; if (ckWARN(WARN_UNINITIALIZED)) @@ -2764,7 +2767,7 @@ Perl_sv_setsv(pTHX_ SV *dstr, register SV *sstr) Perl_warner(aTHX_ WARN_REDEFINE, CvCONST(cv) ? "Constant subroutine %s redefined" - : "Subroutine %s redefined", + : "Subroutine %s redefined", GvENAME((GV*)dstr)); } } |