develooper Front page | perl.perl5.porters | Postings from June 2002

Re: Another Unicode s/// buglet?

Thread Previous
From:
Jarkko Hietaniemi
Date:
June 26, 2002 09:34
Subject:
Re: Another Unicode s/// buglet?
Message ID:
20020626193017.U23680@alpha.hut.fi
Mopping up.

Change 17362 by jhi@alpha on 2002/06/26 15:25:45

	Let's not leak.

Affected files ...

.... //depot/perl/pp_hot.c#283 edit

Differences ...

==== //depot/perl/pp_hot.c#283 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#282~17358~	Wed Jun 26 17:37:12 2002
+++ perl/pp_hot.c	Wed Jun 26 18:25:45 2002
@@ -1987,7 +1987,7 @@
 	doutf8 = DO_UTF8(dstr);
 	/* replacement needing upgrading? */
 	if (DO_UTF8(TARG) && !doutf8) {
-	     SV *nsv = newSVpvn(c, clen);
+	     SV *nsv = sv_2mortal(newSVpvn(c, clen));
 	     if (PL_encoding)
 		  sv_recode_to_utf8(nsv, PL_encoding);
 	     else
End of Patch.


-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About