summaryrefslogtreecommitdiffhomepage
path: root/src/hash.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-11 15:06:51 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-08-11 15:06:51 +0900
commit5e55b61c44f512b31094f20aee08f6f921344870 (patch)
tree1b7012b0336261163b44db5a996341e18591d80e /src/hash.c
parent4695dfdcb6ce412d4aa4efb146c56c5c32a50e43 (diff)
downloadmruby-5e55b61c44f512b31094f20aee08f6f921344870.tar.gz
mruby-5e55b61c44f512b31094f20aee08f6f921344870.zip
Fix `mrb_int` and `size_t` combination warnings.
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hash.c b/src/hash.c
index fd338d53b..c891e1b22 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -523,13 +523,13 @@ ht_foreach(mrb_state *mrb, htable *t, mrb_hash_foreach_func *func, void *p)
}
}
-mrb_int
+size_t
mrb_os_memsize_of_hash_table(mrb_value obj)
{
struct htable *h = mrb_hash_ptr(obj)->ht;
- mrb_int segkv_size = 0;
+ size_t segkv_size = 0;
- if(h->index) segkv_size = (sizeof(struct segkv) * h->index->capa);
+ if (h->index) segkv_size = (sizeof(struct segkv) * h->index->capa);
return sizeof(htable) +
sizeof(segindex) +