In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c7cffa0b862541c21ec66e4efd2d80e4f0a2f142?hp=163ba113b958ebef4215df1e1b04445b4a85504f>
- Log ----------------------------------------------------------------- commit c7cffa0b862541c21ec66e4efd2d80e4f0a2f142 Author: Nicholas Clark <[email protected]> Date: Fri Oct 16 11:59:48 2009 +0100 Convert sv_2mortal(newSVpvn()) to newSVpvn_flags(), for 5.11.0 and later. M dist/IO/IO.pm M dist/IO/IO.xs commit 8a8fad9addd88c65ee8b18b0e45b2ed9a18987f8 Author: Nicholas Clark <[email protected]> Date: Fri Oct 16 11:41:10 2009 +0100 Convert sv_2mortal(newSVpvn_utf8(...)) to newSVpvn_flags() M dist/threads-shared/shared.pm M dist/threads-shared/shared.xs commit afce0a13caf9540b17869e0f39804bd5e44199c7 Author: Nicholas Clark <[email protected]> Date: Fri Oct 16 10:47:14 2009 +0100 Convert sv_2mortal(newSVpvn(...)) to newSVpvs_flags(..., SVs_TEMP) Optionally use ppport.h to provide it for us. M dist/Storable/Storable.pm M dist/Storable/Storable.xs ----------------------------------------------------------------------- Summary of changes: dist/IO/IO.pm | 2 +- dist/IO/IO.xs | 4 ++++ dist/Storable/Storable.pm | 2 +- dist/Storable/Storable.xs | 5 +++-- dist/threads-shared/shared.pm | 2 +- dist/threads-shared/shared.xs | 4 ++-- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm index c63648e..61e957c 100644 --- a/dist/IO/IO.pm +++ b/dist/IO/IO.pm @@ -7,7 +7,7 @@ use Carp; use strict; use warnings; -our $VERSION = "1.25_01"; +our $VERSION = "1.25_02"; XSLoader::load 'IO', $VERSION; sub import { diff --git a/dist/IO/IO.xs b/dist/IO/IO.xs index d3dff55..08fefb0 100644 --- a/dist/IO/IO.xs +++ b/dist/IO/IO.xs @@ -158,7 +158,11 @@ fgetpos(handle) if (fgetpos(handle, &pos)) { ST(0) = &PL_sv_undef; } else { +# if PERL_VERSION >= 11 + ST(0) = newSVpvn_flags((char*)&pos, sizeof(Fpos_t), SVs_TEMP); +# else ST(0) = sv_2mortal(newSVpvn((char*)&pos, sizeof(Fpos_t))); +# endif } #endif } diff --git a/dist/Storable/Storable.pm b/dist/Storable/Storable.pm index 2b1acb4..b60a5f6 100644 --- a/dist/Storable/Storable.pm +++ b/dist/Storable/Storable.pm @@ -23,7 +23,7 @@ use AutoLoader; use FileHandle; use vars qw($canonical $forgive_me $VERSION); -$VERSION = '2.21'; +$VERSION = '2.22'; *AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr... # diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 2741c7d..8d8b629 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -17,10 +17,11 @@ #include <patchlevel.h> /* Perl's one, needed since 5.6 */ #endif -#if !defined(PERL_VERSION) || PERL_VERSION < 8 +#if !defined(PERL_VERSION) || PERL_VERSION < 8 || (PERL_VERSION == 8 && PERL_SUBVERSION < 9) || (PERL_VERSION == 10 && PERL_SUBVERSION < 1) #define NEED_load_module #define NEED_vload_module #define NEED_newCONSTSUB +#define NEED_newSVpvn_flags #include "ppport.h" /* handle old perls */ #endif @@ -2640,7 +2641,7 @@ static int store_code(pTHX_ stcxt_t *cxt, CV *cv) */ PUSHMARK(sp); - XPUSHs(sv_2mortal(newSVpvn("B::Deparse",10))); + XPUSHs(newSVpvs_flags("B::Deparse", SVs_TEMP)); PUTBACK; count = call_method("new", G_SCALAR); SPAGAIN; 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; -- Perl5 Master Repository
