Convert sv_2mortal(newSVpvn_utf8(...)) to newSVpvn_flags()
Nicholas Clark [Fri, 16 Oct 2009 10:41:10 +0000 (11:41 +0100)]
dist/threads-shared/shared.pm
dist/threads-shared/shared.xs

index b1b4552..5a97361 100644 (file)
@@ -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;
 
index b9a3241..7c9526e 100644 (file)
@@ -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;