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

ruby-changes:13336

From: nobu <ko1@a...>
Date: Sat, 26 Sep 2009 16:34:17 +0900 (JST)
Subject: [ruby-changes:13336] Ruby:r25100 (trunk): * string.c (rb_hash_start): fixed shift width on 128bit platform.

nobu	2009-09-26 16:32:03 +0900 (Sat, 26 Sep 2009)

  New Revision: 25100

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

  Log:
    * string.c (rb_hash_start): fixed shift width on 128bit platform.

  Modified files:
    trunk/ChangeLog
    trunk/string.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 25099)
+++ ChangeLog	(revision 25100)
@@ -1,5 +1,7 @@
-Sat Sep 26 16:26:44 2009  Nobuyoshi Nakada  <nobu@r...>
+Sat Sep 26 16:32:01 2009  Nobuyoshi Nakada  <nobu@r...>
 
+	* string.c (rb_hash_start): fixed shift width on 128bit platform.
+
 	* include/ruby/intern.h (rb_hash_{start,uint32,uint,end}): fixed
 	  prototypes.
 
Index: string.c
===================================================================
--- string.c	(revision 25099)
+++ string.c	(revision 25100)
@@ -2206,15 +2206,15 @@
     if (!hashseed_init) {
         hashseed = rb_genrand_int32();
 #if SIZEOF_VALUE*CHAR_BIT > 4*8
-	hashseed <<= 4*8;
+	hashseed <<= 32;
 	hashseed |= rb_genrand_int32();
 #endif
 #if SIZEOF_VALUE*CHAR_BIT > 8*8
-	hashseed <<= 8*8;
+	hashseed <<= 32;
 	hashseed |= rb_genrand_int32();
 #endif
 #if SIZEOF_VALUE*CHAR_BIT > 12*8
-	hashseed <<= 12*8;
+	hashseed <<= 32;
 	hashseed |= rb_genrand_int32();
 #endif
         hashseed_init = 1;

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

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