summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e94330d20bb..088887d5021 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jan 19 17:33:47 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (hash): defaulted to MurmurHash 2.0.
+
Mon Jan 19 17:29:34 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/defines.h (RUBY_ALIAS_FUNCTION_TYPE): added.
diff --git a/string.c b/string.c
index 5540097496d..f6027df0763 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