summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-03 23:50:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-03 23:50:51 +0000
commitf41eaf8431d4ed41f6024aeabc5f21a27f6b7223 (patch)
treebde99756473189052267740720fac9034821c614 /string.c
parent252168ed1b78534af4d4cec3a1f0ba8f3348f9f3 (diff)
* random.c (rb_hash_start): moved from string.c.
* random.c (Init_RandomSeed2): register global address before set. * random.c (Init_RandomSeed): initialize hashseed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/string.c b/string.c
index f67997939d..ae1e3154e4 100644
--- a/string.c
+++ b/string.c
@@ -1993,32 +1993,6 @@ rb_str_concat(VALUE str1, VALUE str2)
}
st_index_t
-rb_hash_start(st_index_t h)
-{
- static int hashseed_init = 0;
- static st_index_t hashseed;
-
- if (!hashseed_init) {
- hashseed = rb_genrand_int32();
-#if SIZEOF_ST_INDEX_T*CHAR_BIT > 4*8
- hashseed <<= 32;
- hashseed |= rb_genrand_int32();
-#endif
-#if SIZEOF_ST_INDEX_T*CHAR_BIT > 8*8
- hashseed <<= 32;
- hashseed |= rb_genrand_int32();
-#endif
-#if SIZEOF_ST_INDEX_T*CHAR_BIT > 12*8
- hashseed <<= 32;
- hashseed |= rb_genrand_int32();
-#endif
- hashseed_init = 1;
- }
-
- return st_hash_start(hashseed + h);
-}
-
-st_index_t
rb_memhash(const void *ptr, long len)
{
return st_hash(ptr, len, rb_hash_start(0));