diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | string.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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. @@ -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 |