ruby-changes:30158
From: akr <ko1@a...>
Date: Sun, 28 Jul 2013 12:51:25 +0900 (JST)
Subject: [ruby-changes:30158] akr:r42210 (trunk): * bignum.c (absint_numwords_generic): The char_bit variable changed
akr 2013-07-28 12:51:13 +0900 (Sun, 28 Jul 2013) New Revision: 42210 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42210 Log: * bignum.c (absint_numwords_generic): The char_bit variable changed to a static constant. Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 42209) +++ ChangeLog (revision 42210) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jul 28 12:41:39 2013 Tanaka Akira <akr@f...> + + * bignum.c (absint_numwords_generic): The char_bit variable changed + to static constant. + Sun Jul 28 12:03:23 2013 Tanaka Akira <akr@f...> * bignum.c: Constify bary_* functions. Index: bignum.c =================================================================== --- bignum.c (revision 42209) +++ bignum.c (revision 42210) @@ -3175,8 +3175,8 @@ absint_numwords_small(size_t numbytes, i https://github.com/ruby/ruby/blob/trunk/bignum.c#L3175 static size_t absint_numwords_generic(size_t numbytes, int nlz_bits_in_msbyte, size_t word_numbits, size_t *nlz_bits_ret) { + static const BDIGIT char_bit[1] = { CHAR_BIT }; BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))]; - BDIGIT char_bit[1] = { CHAR_BIT }; BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)]; BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte }; BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))]; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/