diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-06-02 17:25:18 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-06-02 17:25:18 +0900 |
| commit | e65d4938f373132f2ab5c75533e0bd18e188f9bc (patch) | |
| tree | 904117152c9090d909c3dd5365dfa23875784be6 /src | |
| parent | b2d0f22dee87651bca4e16e287cab61dc303db19 (diff) | |
| download | mruby-e65d4938f373132f2ab5c75533e0bd18e188f9bc.tar.gz mruby-e65d4938f373132f2ab5c75533e0bd18e188f9bc.zip | |
'mrb_sym' used as 'uint32_t'. it's broken portability; based on the work from @crimsonwoods; close #216
Diffstat (limited to 'src')
| -rw-r--r-- | src/class.c | 4 | ||||
| -rw-r--r-- | src/kernel.c | 4 | ||||
| -rw-r--r-- | src/variable.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/class.c b/src/class.c index b13ab2288..9424e8d84 100644 --- a/src/class.c +++ b/src/class.c @@ -17,8 +17,8 @@ #include "mruby/khash.h" -KHASH_MAP_INIT_INT(mt, struct RProc*); -KHASH_MAP_INIT_INT(iv, mrb_value); +KHASH_INIT(mt, mrb_sym, struct RProc*, 1, kh_int_hash_func, kh_int_hash_equal) +KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal) typedef struct fc_result { mrb_sym name; diff --git a/src/kernel.c b/src/kernel.c index 9092d239d..15a4158a4 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -39,8 +39,8 @@ typedef enum { #include "regint.h" #endif -KHASH_MAP_INIT_INT(mt, struct RProc*); -KHASH_MAP_INIT_INT(iv, mrb_value); +KHASH_INIT(mt, mrb_sym, struct RProc*, 1, kh_int_hash_func, kh_int_hash_equal) +KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal) #ifndef FALSE #define FALSE 0 diff --git a/src/variable.c b/src/variable.c index 82ab7bef3..a17484903 100644 --- a/src/variable.c +++ b/src/variable.c @@ -19,7 +19,7 @@ #include "st.h" #endif -KHASH_MAP_INIT_INT(iv, mrb_value); +KHASH_INIT(iv, mrb_sym, mrb_value, 1, kh_int_hash_func, kh_int_hash_equal) #ifndef FALSE #define FALSE 0 |
