Change 33837 by [EMAIL PROTECTED] on 2008/05/16 18:07:00
Upgrade to Math-BigInt-FastCalc-0.19
Affected files ...
... //depot/perl/ext/Math/BigInt/FastCalc/FastCalc.pm#11 edit
... //depot/perl/ext/Math/BigInt/FastCalc/FastCalc.xs#10 edit
... //depot/perl/ext/Math/BigInt/FastCalc/t/bigintfc.t#4 edit
... //depot/perl/ext/Math/BigInt/FastCalc/t/bootstrap.t#2 edit
Differences ...
==== //depot/perl/ext/Math/BigInt/FastCalc/FastCalc.pm#11 (text) ====
Index: perl/ext/Math/BigInt/FastCalc/FastCalc.pm
--- perl/ext/Math/BigInt/FastCalc/FastCalc.pm#10~31875~ 2007-09-16
03:48:40.000000000 -0700
+++ perl/ext/Math/BigInt/FastCalc/FastCalc.pm 2008-05-16 11:07:00.000000000
-0700
@@ -11,7 +11,7 @@
@ISA = qw(DynaLoader);
-$VERSION = '0.16';
+$VERSION = '0.19';
bootstrap Math::BigInt::FastCalc $VERSION;
@@ -60,6 +60,7 @@
1;
__END__
+=pod
=head1 NAME
==== //depot/perl/ext/Math/BigInt/FastCalc/FastCalc.xs#10 (text) ====
Index: perl/ext/Math/BigInt/FastCalc/FastCalc.xs
--- perl/ext/Math/BigInt/FastCalc/FastCalc.xs#9~31608~ 2007-07-13
05:13:09.000000000 -0700
+++ perl/ext/Math/BigInt/FastCalc/FastCalc.xs 2008-05-16 11:07:00.000000000
-0700
@@ -2,6 +2,11 @@
#include "perl.h"
#include "XSUB.h"
+/* for Perl prior to v5.7.1 */
+#ifndef SvUOK
+# define SvUOK(sv) SvIOK_UV(sv)
+#endif
+
double XS_BASE = 0;
double XS_BASE_LEN = 0;
@@ -61,7 +66,7 @@
/* create the array */
RETVAL = newAV();
sv_2mortal((SV*)RETVAL);
- if (SvIOK(x) && SvUV(x) < XS_BASE)
+ if (SvUOK(x) && SvUV(x) < XS_BASE)
{
/* shortcut for integer arguments */
av_push (RETVAL, newSVuv( SvUV(x) ));
@@ -112,7 +117,7 @@
a = (AV*)SvRV(x); /* ref to aray, don't check ref */
elems = av_len(a); /* number of elems in array */
a2 = (AV*)sv_2mortal((SV*)newAV());
- av_extend (a2, elems); /* prepadd */
+ av_extend (a2, elems); /* pre-padd */
while (elems >= 0)
{
/* av_store( a2, elems, newSVsv( (SV*)*av_fetch(a, elems, 0) ) ); */
@@ -201,7 +206,7 @@
while (index <= elems)
{
temp = *av_fetch(a, index, 0); /* fetch ptr to current element */
- sv_setnv (temp, SvNV(temp)-1);
+ sv_setnv (temp, SvNV(temp)-1); /* decrement */
if (SvNV(temp) >= 0)
{
break; /* early out */
==== //depot/perl/ext/Math/BigInt/FastCalc/t/bigintfc.t#4 (text) ====
Index: perl/ext/Math/BigInt/FastCalc/t/bigintfc.t
--- perl/ext/Math/BigInt/FastCalc/t/bigintfc.t#3~31413~ 2007-06-18
01:49:30.000000000 -0700
+++ perl/ext/Math/BigInt/FastCalc/t/bigintfc.t 2008-05-16 11:07:00.000000000
-0700
@@ -9,7 +9,7 @@
chdir 't' if -d 't';
unshift @INC, '../lib'; # for running manually
unshift @INC, '../blib/arch'; # for running manually
- plan tests => 361;
+ plan tests => 359;
}
use Math::BigInt::FastCalc;
@@ -32,14 +32,6 @@
ok (ref($x),'ARRAY'); ok ($C->_str($x),123); ok ($C->_str($y),321);
###############################################################################
-# _new(0xffffffff) (the test is important for 32 bit Perls)
-
-my $ff = $C->_new(0xffffffff);
-
-ok ($C->_str($ff),"4294967295"); # must not be -1
-ok (scalar @{ $ff }, 2); # must be two parts
-
-###############################################################################
# _add, _sub, _mul, _div
ok ($C->_str($C->_add($x,$y)),444);
ok ($C->_str($C->_sub($x,$y)),123);
==== //depot/perl/ext/Math/BigInt/FastCalc/t/bootstrap.t#2 (text) ====
Index: perl/ext/Math/BigInt/FastCalc/t/bootstrap.t
--- perl/ext/Math/BigInt/FastCalc/t/bootstrap.t#1~24158~ 2005-04-05
05:56:35.000000000 -0700
+++ perl/ext/Math/BigInt/FastCalc/t/bootstrap.t 2008-05-16 11:07:00.000000000
-0700
@@ -6,6 +6,7 @@
$| = 1;
unshift @INC, '../blib/lib';
unshift @INC, '../blib/arch';
+ unshift @INC, '../lib';
chdir 't' if -d 't';
plan tests => 1;
};
End of Patch.