summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorPeter John Acklam <pjacklam@online.no>2011-03-01 13:15:47 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-03-01 13:15:47 +0000
commit824a8d2e4140c4a23efc86735177c66b738af2ad (patch)
treeb6fbc88811378002a2ae4e2a3fe361d13ec21fa1 /dist
parent97b3d10f3f393a500d6363c6c198235799d677e9 (diff)
downloadperl-824a8d2e4140c4a23efc86735177c66b738af2ad.tar.gz
[perl #85118] [PATCH] Update Math::BigInt::FastCalc to CPAN version 0.28
Add Perl v5.6 compatibility code to FastCalc.xs (Closes RT #63859). Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
Diffstat (limited to 'dist')
-rw-r--r--dist/Math-BigInt-FastCalc/FastCalc.xs7
-rw-r--r--dist/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm6
-rw-r--r--dist/Math-BigInt-FastCalc/t/bigintfc.t4
3 files changed, 12 insertions, 5 deletions
diff --git a/dist/Math-BigInt-FastCalc/FastCalc.xs b/dist/Math-BigInt-FastCalc/FastCalc.xs
index caf438ec7a..9f9bb5e377 100644
--- a/dist/Math-BigInt-FastCalc/FastCalc.xs
+++ b/dist/Math-BigInt-FastCalc/FastCalc.xs
@@ -7,6 +7,11 @@
# define SvUOK(sv) SvIOK_UV(sv)
#endif
+/* for Perl v5.6 (RT #63859) */
+#ifndef croak_xs_usage
+# define croak_xs_usage croak
+#endif
+
double XS_BASE = 0;
double XS_BASE_LEN = 0;
@@ -310,7 +315,7 @@ _is_zero(class, x)
SV *const temp = *av_fetch(a, 0, 0); /* fetch first element */
ST(0) = boolSV(SvIV(temp) == ix);
}
- XSRETURN(1);
+ XSRETURN(1);
##############################################################################
diff --git a/dist/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm b/dist/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm
index 5be37aa1f7..9abb12091f 100644
--- a/dist/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm
+++ b/dist/Math-BigInt-FastCalc/lib/Math/BigInt/FastCalc.pm
@@ -4,11 +4,11 @@ use 5.006;
use strict;
use warnings;
-use Math::BigInt::Calc 0.56;
+use Math::BigInt::Calc 1.993;
use vars '$VERSION';
-$VERSION = '0.25';
+$VERSION = '0.28';
##############################################################################
# global constants, flags and accessory
@@ -98,8 +98,10 @@ the same terms as Perl itself.
Original math code by Mark Biggar, rewritten by Tels L<http://bloodgate.com/>
in late 2000.
Separated from BigInt and shaped API with the help of John Peacock.
+
Fixed, sped-up and enhanced by Tels http://bloodgate.com 2001-2003.
Further streamlining (api_version 1 etc.) by Tels 2004-2007.
+
Bug-fixing by Peter John Acklam E<lt>pjacklam@online.noE<gt> 2010-2011.
=head1 SEE ALSO
diff --git a/dist/Math-BigInt-FastCalc/t/bigintfc.t b/dist/Math-BigInt-FastCalc/t/bigintfc.t
index c3909176f5..c8751ad81b 100644
--- a/dist/Math-BigInt-FastCalc/t/bigintfc.t
+++ b/dist/Math-BigInt-FastCalc/t/bigintfc.t
@@ -144,8 +144,8 @@ foreach (qw/ 1 12 123 1234 12345 123456 1234567 12345678 123456789/)
# _zeros
$x = $C->_new("1256000000"); is ($C->_zeros($x),6);
$x = $C->_new("152"); is ($C->_zeros($x),0);
-$x = $C->_new("123000"); is ($C->_zeros($x),3);
-$x = $C->_new("0"); is ($C->_zeros($x),0);
+$x = $C->_new("123000"); is ($C->_zeros($x),3);
+$x = $C->_new("0"); is ($C->_zeros($x),0);
# _lsft, _rsft
$x = $C->_new("10"); $y = $C->_new("3");