From: Graham Barr Date: Thu, 25 Sep 2003 06:57:35 +0000 (+0000) Subject: Update to Scalar-List-Utils 1.13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aaaf1885c04755b7a5780e4948b19633d0243b0f;p=p5sagit%2Fp5-mst-13.2.git Update to Scalar-List-Utils 1.13 p4raw-id: //depot/perl@21371 --- diff --git a/ext/List/Util/ChangeLog b/ext/List/Util/ChangeLog index ddc3923..61ef188 100644 --- a/ext/List/Util/ChangeLog +++ b/ext/List/Util/ChangeLog @@ -1,3 +1,11 @@ +Change 827 on 2003/09/25 by (Graham Barr) + + Release 1.13 + +Change 826 on 2003/09/25 by (Graham Barr) + + Fix NV casting issue with some compilers + Change 825 on 2003/08/14 by (Graham Barr) Release 1.12 diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs index 744d8cd..0e0cfbf 100644 --- a/ext/List/Util/Util.xs +++ b/ext/List/Util/Util.xs @@ -49,7 +49,7 @@ my_cxinc(pTHX) #ifdef SVf_IVisUV # define slu_sv_value(sv) (SvIOK(sv)) ? (SvIOK_UV(sv)) ? (NV)(SvUVX(sv)) : (NV)(SvIVX(sv)) : (SvNV(sv)) #else -# define slu_sv_value(sv) (SvIOK(sv)) ? (NV)(SvIVX(sv)) : SvNV(sv) +# define slu_sv_value(sv) (SvIOK(sv)) ? (NV)(SvIVX(sv)) : (SvNV(sv)) #endif #ifndef Drand01 diff --git a/ext/List/Util/lib/List/Util.pm b/ext/List/Util/lib/List/Util.pm index be59dba..77a52f6 100644 --- a/ext/List/Util/lib/List/Util.pm +++ b/ext/List/Util/lib/List/Util.pm @@ -10,7 +10,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(first min max minstr maxstr reduce sum shuffle); -$VERSION = "1.12"; +$VERSION = "1.13"; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/List/Util/lib/Scalar/Util.pm b/ext/List/Util/lib/Scalar/Util.pm index 5dc566c..c2aabca 100644 --- a/ext/List/Util/lib/Scalar/Util.pm +++ b/ext/List/Util/lib/Scalar/Util.pm @@ -11,7 +11,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.12"; +$VERSION = "1.13"; $VERSION = eval $VERSION; sub export_fail { diff --git a/ext/List/Util/t/sum.t b/ext/List/Util/t/sum.t index 6cd7ea3..f75679d 100755 --- a/ext/List/Util/t/sum.t +++ b/ext/List/Util/t/sum.t @@ -16,7 +16,7 @@ BEGIN { use List::Util qw(sum); -print "1..3\n"; +print "1..6\n"; print "not " if defined sum; print "ok 1\n"; @@ -27,3 +27,14 @@ print "ok 2\n"; print "not " unless sum(1,2,3,4) == 10; print "ok 3\n"; +print "not " unless sum(-1) == -1; +print "ok 4\n"; + +my $x = -3; + +print "not " unless sum($x,3) == 0; +print "ok 5\n"; + +print "not " unless sum(-3.5,3) == -0.5; +print "ok 6\n"; +