From: Nicholas Clark Date: Fri, 16 Oct 2009 10:41:10 +0000 (+0100) Subject: Convert sv_2mortal(newSVpvn_utf8(...)) to newSVpvn_flags() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a8fad9addd88c65ee8b18b0e45b2ed9a18987f8;p=p5sagit%2Fp5-mst-13.2.git Convert sv_2mortal(newSVpvn_utf8(...)) to newSVpvn_flags() --- diff --git a/dist/threads-shared/shared.pm b/dist/threads-shared/shared.pm index b1b4552..5a97361 100644 --- a/dist/threads-shared/shared.pm +++ b/dist/threads-shared/shared.pm @@ -7,7 +7,7 @@ use warnings; use Scalar::Util qw(reftype refaddr blessed); -our $VERSION = '1.31'; +our $VERSION = '1.32'; my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs index b9a3241..7c9526e 100644 --- a/dist/threads-shared/shared.xs +++ b/dist/threads-shared/shared.xs @@ -1323,7 +1323,7 @@ FIRSTKEY(SV *obj) I32 utf8 = HeKUTF8(entry); key = hv_iterkey(entry,&len); CALLER_CONTEXT; - ST(0) = sv_2mortal(newSVpvn_utf8(key, len, utf8)); + ST(0) = newSVpvn_flags(key, len, SVs_TEMP | (utf8 ? SVf_UTF8 : 0)); } else { CALLER_CONTEXT; ST(0) = &PL_sv_undef; @@ -1350,7 +1350,7 @@ NEXTKEY(SV *obj, SV *oldkey) I32 utf8 = HeKUTF8(entry); key = hv_iterkey(entry,&len); CALLER_CONTEXT; - ST(0) = sv_2mortal(newSVpvn_utf8(key, len, utf8)); + ST(0) = newSVpvn_flags(key, len, SVs_TEMP | (utf8 ? SVf_UTF8 : 0)); } else { CALLER_CONTEXT; ST(0) = &PL_sv_undef;