diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-02 08:40:37 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-10-02 11:43:35 +0900 |
commit | 806e7947fec775ce27aa783ee00dbd8f52685db8 (patch) | |
tree | 2b3ef290f4f9a418ca0e10e2c59a4932be93ca9e /hash.c | |
parent | 601c67e42ccdd0cab10c8e1097401876f24308b0 (diff) |
Add rb_ident_hash_new_with_size
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4893
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -4425,6 +4425,14 @@ rb_ident_hash_new(void) return hash; } +VALUE +rb_ident_hash_new_with_size(st_index_t size) +{ + VALUE hash = rb_hash_new(); + RHASH_ST_TABLE_SET(hash, st_init_table_with_size(&identhash, size)); + return hash; +} + st_table * rb_init_identtable(void) { |