ruby-changes:30523
From: akr <ko1@a...>
Date: Sun, 18 Aug 2013 03:22:09 +0900 (JST)
Subject: [ruby-changes:30523] akr:r42602 (trunk): * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn).
akr 2013-08-18 03:21:46 +0900 (Sun, 18 Aug 2013) New Revision: 42602 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42602 Log: * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn). Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42601) +++ ChangeLog (revision 42602) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Aug 18 03:18:45 2013 Tanaka Akira <akr@f...> + + * bignum.c (rb_big2str1): Use power_level instead of bitsize(xn). + Sun Aug 18 00:44:58 2013 Tanaka Akira <akr@f...> * bignum.c (BIGDIVREM_EXTRA_WORDS): Redefine to 1. Index: bignum.c =================================================================== --- bignum.c (revision 42601) +++ bignum.c (revision 42602) @@ -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 = bitsize(xn) + 1 + RBIGNUM_LEN(power); + wn = power_level + 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/