mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Rename mrb_os_memsize_of_hash_table to mrb_hash_memsize
* The term `hash_table` can be misleading because the return value of this function includes memory usage of entire `Hash` object, including not only hash table part but also entry list part, etc. * This function takes a `Hash` object as a receiver and is defined in `src/hash.c`, so it is natural to have a `mrb_hash_` prefix.
This commit is contained in:
@@ -35,7 +35,7 @@ struct RHash {
|
||||
#define mrb_hash_ptr(v) ((struct RHash*)(mrb_ptr(v)))
|
||||
#define mrb_hash_value(p) mrb_obj_value((void*)(p))
|
||||
|
||||
size_t mrb_os_memsize_of_hash_table(mrb_value obj);
|
||||
size_t mrb_hash_memsize(mrb_value obj);
|
||||
MRB_API mrb_value mrb_hash_new_capa(mrb_state *mrb, mrb_int capa);
|
||||
MRB_API mrb_value mrb_ensure_hash_type(mrb_state *mrb, mrb_value hash);
|
||||
MRB_API mrb_value mrb_check_hash_type(mrb_state *mrb, mrb_value hash);
|
||||
|
||||
Reference in New Issue
Block a user