summaryrefslogtreecommitdiff
path: root/cpan/List-Util
diff options
context:
space:
mode:
authorSteffen Mueller <smueller@cpan.org>2010-04-18 17:51:19 +0200
committerSteffen Mueller <smueller@cpan.org>2010-04-20 22:46:05 +0200
commit4daffb2bd8ac01845985e3bfe0e23d10a1dab19c (patch)
tree0831989ab1a83e4f184cea256e2746ec35b11e1d /cpan/List-Util
parent4db98c67157803f38c3920ded8b3708deb8accd5 (diff)
downloadperl-4daffb2bd8ac01845985e3bfe0e23d10a1dab19c.tar.gz
Upgrade Scalar-List-Utils to 1.23 from CPAN
Diffstat (limited to 'cpan/List-Util')
-rw-r--r--cpan/List-Util/Changes10
-rw-r--r--cpan/List-Util/ListUtil.xs17
-rw-r--r--cpan/List-Util/lib/List/Util.pm2
-rw-r--r--cpan/List-Util/lib/List/Util/PP.pm2
-rw-r--r--cpan/List-Util/lib/List/Util/XS.pm2
-rw-r--r--cpan/List-Util/lib/Scalar/Util.pm2
-rw-r--r--cpan/List-Util/lib/Scalar/Util/PP.pm19
-rw-r--r--cpan/List-Util/t/max.t1
-rw-r--r--cpan/List-Util/t/min.t1
9 files changed, 31 insertions, 25 deletions
diff --git a/cpan/List-Util/Changes b/cpan/List-Util/Changes
index 8f71596e13..552a95a13c 100644
--- a/cpan/List-Util/Changes
+++ b/cpan/List-Util/Changes
@@ -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]
diff --git a/cpan/List-Util/ListUtil.xs b/cpan/List-Util/ListUtil.xs
index dfde039fb6..7da9b959d1 100644
--- a/cpan/List-Util/ListUtil.xs
+++ b/cpan/List-Util/ListUtil.xs
@@ -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);
diff --git a/cpan/List-Util/lib/List/Util.pm b/cpan/List-Util/lib/List/Util.pm
index 2b51a69d79..aced6b15b5 100644
--- a/cpan/List-Util/lib/List/Util.pm
+++ b/cpan/List-Util/lib/List/Util.pm
@@ -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;
diff --git a/cpan/List-Util/lib/List/Util/PP.pm b/cpan/List-Util/lib/List/Util/PP.pm
index 425f1c5015..2771329b56 100644
--- a/cpan/List-Util/lib/List/Util/PP.pm
+++ b/cpan/List-Util/lib/List/Util/PP.pm
@@ -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 (&@) {
diff --git a/cpan/List-Util/lib/List/Util/XS.pm b/cpan/List-Util/lib/List/Util/XS.pm
index 76bf6469c4..2dcb03a28e 100644
--- a/cpan/List-Util/lib/List/Util/XS.pm
+++ b/cpan/List-Util/lib/List/Util/XS.pm
@@ -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
diff --git a/cpan/List-Util/lib/Scalar/Util.pm b/cpan/List-Util/lib/Scalar/Util.pm
index 24f146f2b3..24138ca4d8 100644
--- a/cpan/List-Util/lib/Scalar/Util.pm
+++ b/cpan/List-Util/lib/Scalar/Util.pm
@@ -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) {
diff --git a/cpan/List-Util/lib/Scalar/Util/PP.pm b/cpan/List-Util/lib/Scalar/Util/PP.pm
index e94fe86f21..7850e1b812 100644
--- a/cpan/List-Util/lib/Scalar/Util/PP.pm
+++ b/cpan/List-Util/lib/Scalar/Util/PP.pm
@@ -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
);
diff --git a/cpan/List-Util/t/max.t b/cpan/List-Util/t/max.t
index a98219897c..aff916658f 100644
--- a/cpan/List-Util/t/max.t
+++ b/cpan/List-Util/t/max.t
@@ -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;
diff --git a/cpan/List-Util/t/min.t b/cpan/List-Util/t/min.t
index eb8c1b9c70..13d1116a6c 100644
--- a/cpan/List-Util/t/min.t
+++ b/cpan/List-Util/t/min.t
@@ -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;