1
0
Fork 0
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:
akr 2013-06-07 12:16:32 +00:00
parent 8f7a307588
commit 07b72b8c85

View file

@ -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));