From: Nick Ing-Simmons Date: Sat, 28 Oct 2000 10:43:44 +0000 (+0000) Subject: Fix for sv_2iv() on "shared" value from keys %hash. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=47deb5e7d69449fbaa65f4bd4f42d66014743a75;p=p5sagit%2Fp5-mst-13.2.git Fix for sv_2iv() on "shared" value from keys %hash. p4raw-id: //depot/perl@7464 --- diff --git a/sv.c b/sv.c index 726f853..5fd6533 100644 --- a/sv.c +++ b/sv.c @@ -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)); } }