mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8f7a307588
commit
07b72b8c85
1 changed files with 2 additions and 4 deletions
6
bignum.c
6
bignum.c
|
@ -874,10 +874,7 @@ rb_int_import(int sign, const void *words, size_t wordcount, int wordorder, size
|
|||
if (sign != 1 && sign != 0 && sign != -1)
|
||||
rb_raise(rb_eArgError, "unexpected sign: %d", sign);
|
||||
|
||||
/*
|
||||
* num_bits = (wordsize * CHAR_BIT - nails) * count
|
||||
* num_bdigits = (num_bits + SIZEOF_BDIGITS*CHAR_BIT - 1) / (SIZEOF_BDIGITS*CHAR_BIT)
|
||||
*/
|
||||
/* num_bits = (wordsize * CHAR_BIT - nails) * count */
|
||||
num_bits = SIZET2NUM(wordsize);
|
||||
num_bits = rb_funcall(num_bits, '*', 1, LONG2FIX(CHAR_BIT));
|
||||
num_bits = rb_funcall(num_bits, '-', 1, SIZET2NUM(nails));
|
||||
|
@ -886,6 +883,7 @@ rb_int_import(int sign, const void *words, size_t wordcount, int wordorder, size
|
|||
if (num_bits == LONG2FIX(0))
|
||||
return LONG2FIX(0);
|
||||
|
||||
/* num_bdigits = (num_bits + SIZEOF_BDIGITS*CHAR_BIT - 1) / (SIZEOF_BDIGITS*CHAR_BIT) */
|
||||
num_bdigits = rb_funcall(num_bits, '+', 1, LONG2FIX(SIZEOF_BDIGITS*CHAR_BIT-1));
|
||||
num_bdigits = rb_funcall(num_bdigits, '/', 1, LONG2FIX(SIZEOF_BDIGITS*CHAR_BIT));
|
||||
|
||||
|
|
Loading…
Reference in a new issue