summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorksss <[email protected]>2014-04-02 13:20:47 +0000
committerksss <[email protected]>2014-04-02 13:24:50 +0000
commit0f1a984a4fffe0ae6318f46158ebda74feff6eca (patch)
tree6779ec45f229c05fc824ee9b9ea90ca5a7df61b9
parent8eaee918922e3542aec3ffa01321e019aab842ab (diff)
downloadmruby-0f1a984a4fffe0ae6318f46158ebda74feff6eca.tar.gz
mruby-0f1a984a4fffe0ae6318f46158ebda74feff6eca.zip
use size_t instead of int
-rw-r--r--include/mruby/khash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/khash.h b/include/mruby/khash.h
index 17e6806b0..145b060c0 100644
--- a/include/mruby/khash.h
+++ b/include/mruby/khash.h
@@ -96,7 +96,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
void kh_alloc_##name(mrb_state *mrb, kh_##name##_t *h) \
{ \
khint_t sz = h->n_buckets; \
- int len = sizeof(khkey_t) + (kh_is_map ? sizeof(khval_t) : 0); \
+ size_t len = sizeof(khkey_t) + (kh_is_map ? sizeof(khval_t) : 0); \
uint8_t *p = (uint8_t*)mrb_malloc(mrb, sizeof(uint8_t)*sz/4+len*sz); \
h->size = h->n_occupied = 0; \
h->upper_bound = UPPER_BOUND(sz); \