summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-04-03 20:35:27 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-04-03 20:35:27 +0900
commitfc2b37f0ee87d64ff1253aaa9774558423b9651a (patch)
treeeb0afe6c80945bc4ea668a03b3a4ecfeb91fa7ca
parentfdf87b7a3f7912adcce9dae0c59e361627a851f4 (diff)
downloadmruby-fc2b37f0ee87d64ff1253aaa9774558423b9651a.tar.gz
mruby-fc2b37f0ee87d64ff1253aaa9774558423b9651a.zip
space adjustment in khash.h
-rw-r--r--include/mruby/khash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/mruby/khash.h b/include/mruby/khash.h
index 5121f4708..28bbfe434 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; \
- size_t 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->keys = (khkey_t *)p; \
@@ -169,7 +169,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
khint_t kh_put_##name(mrb_state *mrb, kh_##name##_t *h, khkey_t key) \
{ \
khint_t k; \
- if (h->n_occupied >= khash_upper_bound(h)) { \
+ if (h->n_occupied >= khash_upper_bound(h)) { \
kh_resize_##name(mrb, h, h->n_buckets*2); \
} \
k = __hash_func(mrb,key) & khash_mask(h); \