Change 33824 by [EMAIL PROTECTED] on 2008/05/13 19:50:23

        Upgrade to Devel::PPPort 3.13_03

Affected files ...

... //depot/perl/ext/Devel/PPPort/Changes#44 edit
... //depot/perl/ext/Devel/PPPort/PPPort_pm.PL#37 edit
... //depot/perl/ext/Devel/PPPort/parts/inc/SvPV#11 edit
... //depot/perl/ext/Devel/PPPort/soak#32 edit
... //depot/perl/ext/Devel/PPPort/t/SvPV.t#8 edit

Differences ...

==== //depot/perl/ext/Devel/PPPort/Changes#44 (xtext) ====
Index: perl/ext/Devel/PPPort/Changes
--- perl/ext/Devel/PPPort/Changes#43~33672~     2008-04-13 06:12:15.000000000 
-0700
+++ perl/ext/Devel/PPPort/Changes       2008-05-13 12:50:23.000000000 -0700
@@ -1,3 +1,8 @@
+3.13_03 - 2008-05-13
+
+    * fix CPAN #35835: SvPV_flags_const_nolen segfaults prior
+      to perl 5.8.8
+
 3.13_02 - 2008-04-13
 
     * fix NV[efg]f format string macros for perl-5.6.0 built

==== //depot/perl/ext/Devel/PPPort/PPPort_pm.PL#37 (text) ====
Index: perl/ext/Devel/PPPort/PPPort_pm.PL
--- perl/ext/Devel/PPPort/PPPort_pm.PL#36~33672~        2008-04-13 
06:12:15.000000000 -0700
+++ perl/ext/Devel/PPPort/PPPort_pm.PL  2008-05-13 12:50:23.000000000 -0700
@@ -508,7 +508,7 @@
 use strict;
 use vars qw($VERSION $data);
 
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_02 $' =~ 
/(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_03 $' =~ 
/(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
 
 sub _init_data
 {

==== //depot/perl/ext/Devel/PPPort/parts/inc/SvPV#11 (text) ====
Index: perl/ext/Devel/PPPort/parts/inc/SvPV
--- perl/ext/Devel/PPPort/parts/inc/SvPV#10~32827~      2008-01-04 
06:10:18.000000000 -0800
+++ perl/ext/Devel/PPPort/parts/inc/SvPV        2008-05-13 12:50:23.000000000 
-0700
@@ -1,8 +1,8 @@
 
################################################################################
 ##
-##  $Revision: 19 $
+##  $Revision: 20 $
 ##  $Author: mhx $
-##  $Date: 2008/01/04 10:47:43 +0100 $
+##  $Date: 2008/05/13 21:05:51 +0200 $
 ##
 
################################################################################
 ##
@@ -27,6 +27,7 @@
 
 NEED_sv_2pv_flags
 NEED_sv_2pv_flags_GLOBAL
+DPPP_SVPV_NOLEN_LP_ARG
 
 =implementation
 
@@ -131,6 +132,12 @@
 
 #endif
 
+#if { VERSION < 5.8.8 } || ( { VERSION >= 5.9.0 } && { VERSION < 5.9.3 } )
+# define DPPP_SVPV_NOLEN_LP_ARG &PL_na
+#else
+# define DPPP_SVPV_NOLEN_LP_ARG 0
+#endif
+
 __UNDEFINED__  SvPV_const(sv, lp)      SvPV_flags_const(sv, lp, SV_GMAGIC)
 __UNDEFINED__  SvPV_mutable(sv, lp)    SvPV_flags_mutable(sv, lp, SV_GMAGIC)
 
@@ -146,7 +153,7 @@
 __UNDEFINED__  SvPV_flags_const_nolen(sv, flags) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
                   ? SvPVX_const(sv) : \
-                  (const char*) sv_2pv_flags(sv, 0, flags|SV_CONST_RETURN))
+                  (const char*) sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 
flags|SV_CONST_RETURN))
 
 __UNDEFINED__  SvPV_flags_mutable(sv, lp, flags) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
@@ -165,7 +172,7 @@
 
 __UNDEFINED__  SvPV_force_flags_nolen(sv, flags) \
                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
-                 ? SvPVX(sv) : sv_pvn_force_flags(sv, 0, flags))
+                 ? SvPVX(sv) : sv_pvn_force_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 
flags))
 
 __UNDEFINED__  SvPV_force_flags_mutable(sv, lp, flags) \
                  ((SvFLAGS(sv) & (SVf_POK|SVf_THINKFIRST)) == SVf_POK \
@@ -174,11 +181,11 @@
 
 __UNDEFINED__  SvPV_nolen(sv) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
-                  ? SvPVX(sv) : sv_2pv_flags(sv, 0, SV_GMAGIC))
+                  ? SvPVX(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 
SV_GMAGIC))
 
 __UNDEFINED__  SvPV_nolen_const(sv) \
                  ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK \
-                  ? SvPVX_const(sv) : sv_2pv_flags(sv, 0, 
SV_GMAGIC|SV_CONST_RETURN))
+                  ? SvPVX_const(sv) : sv_2pv_flags(sv, DPPP_SVPV_NOLEN_LP_ARG, 
SV_GMAGIC|SV_CONST_RETURN))
 
 __UNDEFINED__  SvPV_nomg(sv, lp) SvPV_flags(sv, lp, 0)
 __UNDEFINED__  SvPV_nomg_const(sv, lp) SvPV_flags_const(sv, lp, 0)
@@ -426,7 +433,7 @@
                RETVAL
 
 
-=tests plan => 20
+=tests plan => 39
 
 my $mhx = "mhx";
 
@@ -457,3 +464,26 @@
 ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
 ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
 
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+

==== //depot/perl/ext/Devel/PPPort/soak#32 (text) ====
Index: perl/ext/Devel/PPPort/soak
--- perl/ext/Devel/PPPort/soak#31~33672~        2008-04-13 06:12:15.000000000 
-0700
+++ perl/ext/Devel/PPPort/soak  2008-05-13 12:50:23.000000000 -0700
@@ -33,7 +33,7 @@
 use List::Util qw(max);
 use Config;
 
-my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_02 $' =~ 
/(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.13_03 $' =~ 
/(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
 
 $| = 1;
 my %OPT = (

==== //depot/perl/ext/Devel/PPPort/t/SvPV.t#8 (text) ====
Index: perl/ext/Devel/PPPort/t/SvPV.t
--- perl/ext/Devel/PPPort/t/SvPV.t#7~31705~     2007-08-12 16:17:42.000000000 
-0700
+++ perl/ext/Devel/PPPort/t/SvPV.t      2008-05-13 12:50:23.000000000 -0700
@@ -30,9 +30,9 @@
     require 'testutil.pl' if $@;
   }
 
-  if (20) {
+  if (39) {
     load();
-    plan(tests => 20);
+    plan(tests => 39);
   }
 }
 
@@ -77,3 +77,26 @@
 ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
 ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
 
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+
End of Patch.

Reply via email to