Convert sv_2mortal(newSVpvn(...)) to newSVpvs_flags(..., SVs_TEMP)
authorNicholas Clark <nick@ccl4.org>
Fri, 16 Oct 2009 09:47:14 +0000 (10:47 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 16 Oct 2009 09:53:13 +0000 (10:53 +0100)
Optionally use ppport.h to provide it for us.

dist/Storable/Storable.pm
dist/Storable/Storable.xs

index 2b1acb4..b60a5f6 100644 (file)
@@ -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...
 
 #
index 2741c7d..8d8b629 100644 (file)
 #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;