From: Artur Bergman Date: Thu, 17 Apr 2003 17:31:52 +0000 (+0000) Subject: Extreme Voodoo programming, by not pinching the SV if it is a X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e6160dc45a74849468013747b2649ba17c9faab;p=p5sagit%2Fp5-mst-13.2.git Extreme Voodoo programming, by not pinching the SV if it is a PADTMP it happily keeps it's value later on! p4raw-id: //depot/perl@19254 --- diff --git a/sv.c b/sv.c index 69cb3bc..6a4dcf1 100644 --- a/sv.c +++ b/sv.c @@ -9864,8 +9864,13 @@ Perl_rvpv_dup(pTHX_ SV *dstr, SV *sstr, CLONE_PARAMS* param) /* Special case - not normally malloced for some reason */ if (SvREADONLY(sstr) && SvFAKE(sstr)) { /* A "shared" PV - clone it as unshared string */ - SvFAKE_off(dstr); - SvREADONLY_off(dstr); + if(!SvPADTMP(sstr)) { + /* However, some of them live in the pad + and they should not have these flags + turned off */ + SvFAKE_off(dstr); + SvREADONLY_off(dstr); + } SvPVX(dstr) = SAVEPVN(SvPVX(sstr), SvCUR(sstr)); } else {