diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-06-01 09:44:19 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-06-01 09:44:19 +0900 |
| commit | 364e6b5a50b9941856ef971dc6ca2d7cf2e4212a (patch) | |
| tree | 98d77bd8bd7807f52cfc6f45366387a9dfa658eb /include | |
| parent | 8180fee1808c56048b9fa18a8dd16014e694e48e (diff) | |
| download | mruby-364e6b5a50b9941856ef971dc6ca2d7cf2e4212a.tar.gz mruby-364e6b5a50b9941856ef971dc6ca2d7cf2e4212a.zip | |
symbol table key should be mrb_sym, not int32_t
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/khash.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/mruby/khash.h b/include/mruby/khash.h index 9950dbc80..06c451e44 100644 --- a/include/mruby/khash.h +++ b/include/mruby/khash.h @@ -190,10 +190,9 @@ static const uint8_t __m[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; #define kh_size(h) ((h)->size) #define kh_n_buckets(h) ((h)->n_buckets) -//#define kh_int_hash_func(mrb,key) (uint32_t)(key) -#define kh_int_hash_func(mrb,key) (uint32_t)((key)^((key)<<2)^((key)>>2)) +#define kh_int_hash_func(mrb,key) (khint_t)((key)^((key)<<2)^((key)>>2)) #define kh_int_hash_equal(mrb,a, b) (a == b) -#define kh_int64_hash_func(mrb,key) (uint32_t)((key)>>33^(key)^(key)<<11) +#define kh_int64_hash_func(mrb,key) (khint_t)((key)>>33^(key)^(key)<<11) #define kh_int64_hash_equal(mrb,a, b) (a == b) static inline khint_t __ac_X31_hash_string(const char *s) { |
