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

ruby-changes:29534

From: akr <ko1@a...>
Date: Sun, 23 Jun 2013 17:31:00 +0900 (JST)
Subject: [ruby-changes:29534] akr:r41586 (trunk): * bignum.c (integer_unpack_single_bdigit): Use a cast.

akr	2013-06-23 17:30:49 +0900 (Sun, 23 Jun 2013)

  New Revision: 41586

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

  Log:
    * bignum.c (integer_unpack_single_bdigit): Use a cast.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41585)
+++ ChangeLog	(revision 41586)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Jun 23 17:29:51 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (integer_unpack_single_bdigit): Use a cast.
+
 Sun Jun 23 15:38:07 2013  Koichi Sasada  <ko1@a...>
 
 	* bootstraptest/test_thread.rb: rescue resource limitation errors.
Index: bignum.c
===================================================================
--- bignum.c	(revision 41585)
+++ bignum.c	(revision 41586)
@@ -1351,7 +1351,7 @@ integer_unpack_single_bdigit(BDIGIT u, s https://github.com/ruby/ruby/blob/trunk/bignum.c#L1351
             ((size == SIZEOF_BDIGITS && u == 0) ? -2 : -1) :
             ((u >> (size * CHAR_BIT - 1)) ? -1 : 1);
         if (sign < 0)
-            u = ((BDIGIT)0) - (u | LSHIFTX((~(BDIGIT)0), size * CHAR_BIT));
+            u = (BDIGIT)(-(u | LSHIFTX((~(BDIGIT)0), size * CHAR_BIT)));
     }
     else
         sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;

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

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