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

ruby-changes:30708

From: akr <ko1@a...>
Date: Tue, 3 Sep 2013 07:41:12 +0900 (JST)
Subject: [ruby-changes:30708] akr:r42787 (trunk): * bignum.c (bytes_2comp): Define it only for little endian

akr	2013-09-03 07:41:07 +0900 (Tue, 03 Sep 2013)

  New Revision: 42787

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

  Log:
    * bignum.c (bytes_2comp): Define it only for little endian
      environment.

  Modified files:
    trunk/ChangeLog
    trunk/bignum.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42786)
+++ ChangeLog	(revision 42787)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Sep  3 07:39:58 2013  Tanaka Akira  <akr@f...>
+
+	* bignum.c (bytes_2comp): Define it only for little endian
+	  environment.
+
 Tue Sep  3 07:31:29 2013  Akinori MUSHA  <knu@i...>
 
 	* numeric.c (NUM_STEP_SCAN_ARGS): Numeral#step should raise
Index: bignum.c
===================================================================
--- bignum.c	(revision 42786)
+++ bignum.c	(revision 42787)
@@ -608,6 +608,7 @@ integer_pack_take_lowbits(int n, BDIGIT_ https://github.com/ruby/ruby/blob/trunk/bignum.c#L608
     return ret;
 }
 
+#if !defined(WORDS_BIGENDIAN)
 static int
 bytes_2comp(unsigned char *buf, size_t len)
 {
@@ -621,6 +622,7 @@ bytes_2comp(unsigned char *buf, size_t l https://github.com/ruby/ruby/blob/trunk/bignum.c#L622
     }
     return 1;
 }
+#endif
 
 static int
 bary_pack(int sign, BDIGIT *ds, size_t num_bdigits, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)

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

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