summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-31 22:32:55 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-31 22:32:55 +0000
commitce20b98b143bda528d87c14128b8e977baece2a9 (patch)
treeef61b050061d9fd5e3608cf26ca002e2a3dd6047
parentb77f98aac2534add70f4535b0ed5d329829f82a2 (diff)
* bignum.c: Use BDIGIT type for hbase.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--bignum.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a174f3f923..c8bb461155 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Jun 1 07:32:15 2013 Tanaka Akira <akr@fsij.org>
+
+ * bignum.c: Use BDIGIT type for hbase.
+
Sat Jun 1 02:37:35 2013 NARUSE, Yui <naruse@ruby-lang.org>
* ext/socket/option.c (sockopt_s_byte): constructor of the sockopt
diff --git a/bignum.c b/bignum.c
index b8ff3fe76e..96b570a52d 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1055,7 +1055,7 @@ big2str_find_n1(VALUE x, int base)
}
static long
-big2str_orig(VALUE x, int base, char* ptr, long len, long hbase, int hbase_numdigits, int trim)
+big2str_orig(VALUE x, int base, char* ptr, long len, BDIGIT hbase, int hbase_numdigits, int trim)
{
long i = RBIGNUM_LEN(x), j = len;
BDIGIT* ds = BDIGITS(x);
@@ -1088,7 +1088,7 @@ big2str_orig(VALUE x, int base, char* ptr, long len, long hbase, int hbase_numdi
static long
big2str_karatsuba(VALUE x, int base, char* ptr,
- long n1, long len, long hbase, int hbase_numdigits, int trim)
+ long n1, long len, BDIGIT hbase, int hbase_numdigits, int trim)
{
long lh, ll, m1;
VALUE b, q, r;
@@ -1120,9 +1120,9 @@ big2str_karatsuba(VALUE x, int base, char* ptr,
}
static void
-calc_hbase(int base, long *hbase_p, int *hbase_numdigits_p)
+calc_hbase(int base, BDIGIT *hbase_p, int *hbase_numdigits_p)
{
- long hbase;
+ BDIGIT hbase;
int hbase_numdigits;
hbase = base;
@@ -1141,7 +1141,8 @@ rb_big2str0(VALUE x, int base, int trim)
{
int off;
VALUE ss, xx;
- long n1, n2, len, hbase;
+ long n1, n2, len;
+ BDIGIT hbase;
int hbase_numdigits;
char* ptr;