diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-18 17:29:34 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-18 17:29:34 +0900 |
| commit | e0df30354733eeeb9f69a9d45617e838ad0ad4a2 (patch) | |
| tree | 86c2315548d0fcbfe38ec91053aa16d1fd73b158 | |
| parent | 557e0645bf8a37951c037cff7f230e5e5610e701 (diff) | |
| parent | 4cea7889705327e6a550183ab751a06465017757 (diff) | |
| download | mruby-e0df30354733eeeb9f69a9d45617e838ad0ad4a2.tar.gz mruby-e0df30354733eeeb9f69a9d45617e838ad0ad4a2.zip | |
Merge pull request #5143 from shuujii/use-mrb_int_value-instead-of-mrb_fixnum_value-in-src-hash.c
Use `mrb_int_value` instead of `mrb_fixnum_value` in `src/hash.c`
| -rw-r--r-- | src/hash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hash.c b/src/hash.c index b049111b6..b800a251a 100644 --- a/src/hash.c +++ b/src/hash.c @@ -29,8 +29,8 @@ * * [HT] * Hash Table Implementation. The structure of `Hash` that has IB and is - * searched by hash table algorithm. It is used when `Hash` > 16. Collision - * resolution strategy is open addressing method. + * searched by hash table algorithm. It is used when `Hash` size > 16. + * Collision resolution strategy is open addressing method. * * [size] * The number of `Hash` entries (value of `Hash#size`). @@ -1522,8 +1522,8 @@ mrb_hash_size(mrb_state *mrb, mrb_value hash) /* 15.2.13.4.25 */ /* * call-seq: - * hsh.length -> fixnum - * hsh.size -> fixnum + * hsh.length -> integer + * hsh.size -> integer * * Returns the number of key-value pairs in the hash. * @@ -1536,7 +1536,7 @@ static mrb_value mrb_hash_size_m(mrb_state *mrb, mrb_value self) { mrb_int size = mrb_hash_size(mrb, self); - return mrb_fixnum_value(size); + return mrb_int_value(mrb, size); } MRB_API mrb_bool |
