ruby-changes:30524
From: akr <ko1@a...>
Date: Sun, 18 Aug 2013 10:07:56 +0900 (JST)
Subject: [ruby-changes:30524] akr:r42603 (trunk): * bignum.c (rb_big2str1): Make an expression more explicit.
akr 2013-08-18 10:07:50 +0900 (Sun, 18 Aug 2013) New Revision: 42603 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42603 Log: * bignum.c (rb_big2str1): Make an expression more explicit. Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42602) +++ ChangeLog (revision 42603) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Aug 18 10:05:12 2013 Tanaka Akira <akr@f...> + + * bignum.c (rb_big2str1): Make an expression more explicit. + Sun Aug 18 03:18:45 2013 Tanaka Akira <akr@f...> * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn). Index: bignum.c =================================================================== --- bignum.c (revision 42602) +++ bignum.c (revision 42603) @@ -4569,7 +4569,7 @@ rb_big2str1(VALUE x, int base) https://github.com/ruby/ruby/blob/trunk/bignum.c#L4569 VALUE tmpw = 0; BDIGIT *wds; size_t wn; - wn = power_level + RBIGNUM_LEN(power); + wn = power_level * BIGDIVREM_EXTRA_WORDS + RBIGNUM_LEN(power); wds = ALLOCV_N(BDIGIT, tmpw, xn + wn); MEMCPY(wds, xds, BDIGIT, xn); big2str_karatsuba(&b2s_data, wds, xn, wn, power_level, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/