[前][次][番号順一覧][スレッド一覧]

ruby-changes:29166

From: akr <ko1@a...>
Date: Mon, 10 Jun 2013 22:10:23 +0900 (JST)
Subject: [ruby-changes:29166] akr:r41218 (trunk): Update a comment.

akr	2013-06-10 22:10:11 +0900 (Mon, 10 Jun 2013)

  New Revision: 41218

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41218

  Log:
    Update a comment.

  Modified files:
    trunk/bignum.c

Index: bignum.c
===================================================================
--- bignum.c	(revision 41217)
+++ bignum.c	(revision 41218)
@@ -628,7 +628,9 @@ absint_numwords_generic(size_t numbytes, https://github.com/ruby/ruby/blob/trunk/bignum.c#L628
  *
  * This function returns ((val_numbits * CHAR_BIT + word_numbits - 1) / word_numbits)
  * where val_numbits is the number of bits of abs(val).
- * If it overflows, (size_t)-1 is returned.
+ *
+ * This function can overflow if _val_ is very big and word_numbits is less than CHAR_BIT.
+ * When overflow occur, (size_t)-1 is returned.
  *
  * If nlz_bits_ret is not NULL and overflow is not occur,
  * (return_value * word_numbits - val_numbits) is stored in *nlz_bits_ret.

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]