From 07b72b8c856353096fad39a7f628e9076533dc18 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 7 Jun 2013 12:16:32 +0000 Subject: [PATCH] Update comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bignum.c b/bignum.c index 5eef0b0d6b..cfad1b11f7 100644 --- a/bignum.c +++ b/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));