This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade Scalar-List-Utils to 1.23 from CPAN
authorSteffen Mueller <smueller@cpan.org>
Sun, 18 Apr 2010 15:51:19 +0000 (17:51 +0200)
committerSteffen Mueller <smueller@cpan.org>
Tue, 20 Apr 2010 20:46:05 +0000 (22:46 +0200)
Porting/Maintainers.pl
cpan/List-Util/Changes
cpan/List-Util/ListUtil.xs
cpan/List-Util/lib/List/Util.pm
cpan/List-Util/lib/List/Util/PP.pm
cpan/List-Util/lib/List/Util/XS.pm
cpan/List-Util/lib/Scalar/Util.pm
cpan/List-Util/lib/Scalar/Util/PP.pm
cpan/List-Util/t/max.t
cpan/List-Util/t/min.t

index e900630..cbd65aa 100755 (executable)
@@ -1311,7 +1311,7 @@ use File::Glob qw(:case);
     'Scalar-List-Utils' =>
        {
        'MAINTAINER'    => 'gbarr',
-       'DISTRIBUTION'  => 'GBARR/Scalar-List-Utils-1.22.tar.gz',
+       'DISTRIBUTION'  => 'GBARR/Scalar-List-Utils-1.23.tar.gz',
        # Note that perl uses its own version of Makefile.PL
        'FILES'         => q[cpan/List-Util],
        'EXCLUDED'      => [ qr{^inc/Module/},
index 8f71596..552a95a 100644 (file)
@@ -1,3 +1,13 @@
+1.23 -- Wed Mar 10 20:50:00 CST 2010
+
+  * Add a test file to ensure 'GETMAGIC' called once [gfx]
+  * "GETMAGIC" should be called only once [gfx]
+  * Use PERL_NO_GET_CONTEXT for efficiency (see perlguts) [gfx]
+  * Don't care about dVAR. ExtUtils::ParseXS deals with it. [gfx]
+  * t/p_max.t, t/p_min.t fail on perl5.8.1.  [tokuhirom]
+  * avoid non-portable warnings
+  * Fix PP::reftype in edge cases [gfx]
+
 1.22 -- Sat Nov 14 09:26:15 CST 2009
 
   * silence a compiler warning about an unreferenced local variable [Steve Hay]
index dfde039..7da9b95 100644 (file)
@@ -2,7 +2,7 @@
  * This program is free software; you can redistribute it and/or
  * modify it under the same terms as Perl itself.
  */
-
+#define PERL_NO_GET_CONTEXT /* we want efficiency */
 #include <EXTERN.h>
 #include <perl.h>
 #include <XSUB.h>
@@ -66,7 +66,7 @@ my_cxinc(pTHX)
 #  ifndef SvTAINTED
 
 static bool
-sv_tainted(SV *sv)
+sv_tainted(pTHX_ SV *sv)
 {
     if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) {
        MAGIC *mg = mg_find(sv, 't');
@@ -77,7 +77,7 @@ sv_tainted(SV *sv)
 }
 
 #    define SvTAINTED_on(sv) sv_magic((sv), Nullsv, 't', Nullch, 0)
-#    define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv))
+#    define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(aTHX_ sv))
 #  endif
 #  define PL_defgv defgv
 #  define PL_op op
@@ -126,10 +126,6 @@ sv_tainted(SV *sv)
 #define dNOOP extern int Perl___notused PERL_UNUSED_DECL
 #endif
 
-#ifndef dVAR
-#define dVAR dNOOP
-#endif
-
 #ifndef GvSVn
 #  define GvSVn GvSV
 #endif
@@ -282,7 +278,7 @@ reduce(block,...)
 PROTOTYPE: &@
 CODE:
 {
-    dVAR; dMULTICALL;
+    dMULTICALL;
     SV *ret = sv_newmortal();
     int index;
     GV *agv,*bgv,*gv;
@@ -321,7 +317,7 @@ first(block,...)
 PROTOTYPE: &@
 CODE:
 {
-    dVAR; dMULTICALL;
+    dMULTICALL;
     int index;
     GV *gv;
     HV *stash;
@@ -359,7 +355,6 @@ shuffle(...)
 PROTOTYPE: @
 CODE:
 {
-    dVAR;
     int index;
 #if (PERL_VERSION < 9)
     struct op dmy_op;
@@ -438,7 +433,7 @@ CODE:
 {
     if (SvMAGICAL(sv))
        mg_get(sv);
-    if(!sv_isobject(sv)) {
+    if(!(SvROK(sv) && SvOBJECT(SvRV(sv)))) {
        XSRETURN_UNDEF;
     }
     RETVAL = (char*)sv_reftype(SvRV(sv),TRUE);
index 2b51a69..aced6b1 100644 (file)
@@ -14,7 +14,7 @@ require Exporter;
 
 @ISA        = qw(Exporter);
 @EXPORT_OK  = qw(first min max minstr maxstr reduce sum shuffle);
-$VERSION    = "1.22";
+$VERSION    = "1.23";
 $XS_VERSION = $VERSION;
 $VERSION    = eval $VERSION;
 
index 425f1c5..2771329 100644 (file)
@@ -13,7 +13,7 @@ require Exporter;
 
 @ISA     = qw(Exporter);
 @EXPORT  = qw(first min max minstr maxstr reduce sum shuffle);
-$VERSION = "1.22";
+$VERSION = "1.23";
 $VERSION = eval $VERSION;
 
 sub reduce (&@) {
index 76bf646..2dcb03a 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 use vars qw($VERSION);
 use List::Util;
 
-$VERSION = "1.22";           # FIXUP
+$VERSION = "1.23";           # FIXUP
 $VERSION = eval $VERSION;    # FIXUP
 
 sub _VERSION { # FIXUP
index 24f146f..24138ca 100644 (file)
@@ -13,7 +13,7 @@ require List::Util; # List::Util loads the XS
 
 @ISA       = qw(Exporter);
 @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype);
-$VERSION    = "1.22";
+$VERSION    = "1.23";
 $VERSION   = eval $VERSION;
 
 unless (defined &dualvar) {
index e94fe86..7850e1b 100644 (file)
@@ -16,7 +16,7 @@ use B qw(svref_2object);
 
 @ISA     = qw(Exporter);
 @EXPORT  = qw(blessed reftype tainted readonly refaddr looks_like_number);
-$VERSION = "1.22";
+$VERSION = "1.23";
 $VERSION = eval $VERSION;
 
 sub blessed ($) {
@@ -41,20 +41,19 @@ sub refaddr($) {
 
   $addr =~ /0x(\w+)/;
   local $^W;
+  no warnings 'portable';
   hex($1);
 }
 
 {
   my %tmap = qw(
-    B::HV HASH
-    B::AV ARRAY
-    B::CV CODE
-    B::IO IO
-    B::NULL SCALAR
-    B::NV SCALAR
-    B::PV SCALAR
-    B::GV GLOB
-    B::RV REF
+    B::NULL   SCALAR
+
+    B::HV     HASH
+    B::AV     ARRAY
+    B::CV     CODE
+    B::IO     IO
+    B::GV     GLOB
     B::REGEXP REGEXP
   );
 
index a982198..aff9166 100644 (file)
@@ -50,6 +50,7 @@ is($v, 3, 'overload');
 use overload
   '""' => sub { ${$_[0]} },
   '+0' => sub { ${$_[0]} },
+  '>'  => sub { ${$_[0]} > ${$_[1]} },
   fallback => 1;
   sub new {
     my $class = shift;
index eb8c1b9..13d1116 100644 (file)
@@ -50,6 +50,7 @@ is($v, 1, 'overload');
 use overload
   '""' => sub { ${$_[0]} },
   '+0' => sub { ${$_[0]} },
+  '<'  => sub { ${$_[0]} < ${$_[1]} },
   fallback => 1;
   sub new {
     my $class = shift;