diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-26 07:32:03 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-26 07:32:03 +0000 |
| commit | f334f1ba85c18b8113eaf8043f3b377abdd92035 (patch) | |
| tree | 5db69f7ea179ca9cf1f7f21960637ebdd22441b6 | |
| parent | 48cd40e230cb800a26d3dffa1176a79c03ff6586 (diff) | |
| download | ruby-f334f1ba85c18b8113eaf8043f3b377abdd92035.tar.gz ruby-f334f1ba85c18b8113eaf8043f3b377abdd92035.tar.xz ruby-f334f1ba85c18b8113eaf8043f3b377abdd92035.zip | |
* string.c (rb_hash_start): fixed shift width on 128bit platform.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | string.c | 6 |
2 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,6 @@ -Sat Sep 26 16:26:44 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> +Sat Sep 26 16:32:01 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * string.c (rb_hash_start): fixed shift width on 128bit platform. * include/ruby/intern.h (rb_hash_{start,uint32,uint,end}): fixed prototypes. @@ -2206,15 +2206,15 @@ rb_hash_start(st_index_t h) 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; |
