summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-19 08:32:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-19 08:32:41 +0000
commit42d9223a2db7da93cf2f937b75b9ae287f6c7a0d (patch)
tree82917eb59288f76091aa6c57c6533e82eb7961f8 /string.c
parent4e6ad7d910a27b9bddc9e3616464885184875ab4 (diff)
* string.c (hash): defaulted to MurmurHash 2.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 5540097496..f6027df076 100644
--- a/string.c
+++ b/string.c
@@ -1883,7 +1883,7 @@ rb_str_concat(VALUE str1, VALUE str2)
/* MurmurHash described in http://murmurhash.googlepages.com/ */
#ifndef MURMUR
-#define MURMUR 1
+#define MURMUR 2
#endif
#define MurmurMagic 0x7fd652ad
@@ -2032,7 +2032,7 @@ hash(const unsigned char * data, int len, unsigned int h)
#endif
#if MURMUR == 1
h = murmur_step(h, t);
-#elif MURMUR1 == 2
+#elif MURMUR == 2
h ^= t;
h *= MurmurMagic;
#endif