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

ruby-changes:29352

From: akr <ko1@a...>
Date: Wed, 19 Jun 2013 07:20:31 +0900 (JST)
Subject: [ruby-changes:29352] akr:r41404 (trunk): * bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which

akr	2013-06-19 07:20:22 +0900 (Wed, 19 Jun 2013)

  New Revision: 41404

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

  Log:
    * bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
      BDIGIT is 16bit.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41403)
+++ ChangeLog	(revision 41404)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jun 19 07:18:47 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (rb_big_aref): Apply BIGLO to ~xds[i] for environment which
+	  BDIGIT is 16bit.
+
 Wed Jun 19 07:09:26 2013  Koichi Sasada  <ko1@a...>
 
 	* gc.c (rgengc_remember): fix output level.
Index: bignum.c
===================================================================
--- bignum.c	(revision 41403)
+++ bignum.c	(revision 41404)
@@ -4877,7 +4877,7 @@ rb_big_aref(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/bignum.c#L4877
     if (!RBIGNUM_SIGN(x)) {
 	xds = BDIGITS(x);
 	i = 0; num = 1;
-	while (num += ~xds[i], ++i <= s1) {
+	while (num += BIGLO(~xds[i]), ++i <= s1) {
 	    num = BIGDN(num);
 	}
     }

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

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