summaryrefslogtreecommitdiff
path: root/ext/List
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2003-09-25 06:57:35 +0000
committerGraham Barr <gbarr@pobox.com>2003-09-25 06:57:35 +0000
commitaaaf1885c04755b7a5780e4948b19633d0243b0f (patch)
treeb44fd567913e76a64951b2a84cb97ffccfe074b4 /ext/List
parent2e75584a9dc32e975efde1885af821901fd45208 (diff)
downloadperl-aaaf1885c04755b7a5780e4948b19633d0243b0f.tar.gz
Update to Scalar-List-Utils 1.13
p4raw-id: //depot/perl@21371
Diffstat (limited to 'ext/List')
-rw-r--r--ext/List/Util/ChangeLog8
-rw-r--r--ext/List/Util/Util.xs2
-rw-r--r--ext/List/Util/lib/List/Util.pm2
-rw-r--r--ext/List/Util/lib/Scalar/Util.pm2
-rwxr-xr-xext/List/Util/t/sum.t13
5 files changed, 23 insertions, 4 deletions
diff --git a/ext/List/Util/ChangeLog b/ext/List/Util/ChangeLog
index ddc392360b..61ef188dee 100644
--- a/ext/List/Util/ChangeLog
+++ b/ext/List/Util/ChangeLog
@@ -1,3 +1,11 @@
+Change 827 on 2003/09/25 by <gbarr@pobox.com> (Graham Barr)
+
+ Release 1.13
+
+Change 826 on 2003/09/25 by <gbarr@pobox.com> (Graham Barr)
+
+ Fix NV casting issue with some compilers
+
Change 825 on 2003/08/14 by <gbarr@pobox.com> (Graham Barr)
Release 1.12
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs
index 744d8cdf94..0e0cfbfc2b 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 be59dbae64..77a52f6e1d 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 5dc566c2f6..c2aabcaa09 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 6cd7ea328e..f75679d558 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";
+