ruby-changes:28960
From: akr <ko1@a...>
Date: Sat, 1 Jun 2013 07:33:05 +0900 (JST)
Subject: [ruby-changes:28960] akr:r41012 (trunk): * bignum.c: Use BDIGIT type for hbase.
akr 2013-06-01 07:32:55 +0900 (Sat, 01 Jun 2013) New Revision: 41012 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41012 Log: * bignum.c: Use BDIGIT type for hbase. Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 41011) +++ ChangeLog (revision 41012) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Jun 1 07:32:15 2013 Tanaka Akira <akr@f...> + + * bignum.c: Use BDIGIT type for hbase. + Sat Jun 1 02:37:35 2013 NARUSE, Yui <naruse@r...> * ext/socket/option.c (sockopt_s_byte): constructor of the sockopt Index: bignum.c =================================================================== --- bignum.c (revision 41011) +++ bignum.c (revision 41012) @@ -1055,7 +1055,7 @@ big2str_find_n1(VALUE x, int base) https://github.com/ruby/ruby/blob/trunk/bignum.c#L1055 } 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* pt https://github.com/ruby/ruby/blob/trunk/bignum.c#L1088 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, cha https://github.com/ruby/ruby/blob/trunk/bignum.c#L1120 } 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) https://github.com/ruby/ruby/blob/trunk/bignum.c#L1141 { int off; VALUE ss, xx; - long n1, n2, len, hbase; + long n1, n2, len; + BDIGIT hbase; int hbase_numdigits; char* ptr; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/