summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-02 08:40:37 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-10-02 11:43:35 +0900
commit806e7947fec775ce27aa783ee00dbd8f52685db8 (patch)
tree2b3ef290f4f9a418ca0e10e2c59a4932be93ca9e /hash.c
parent601c67e42ccdd0cab10c8e1097401876f24308b0 (diff)
downloadruby-806e7947fec775ce27aa783ee00dbd8f52685db8.tar.gz
Add rb_ident_hash_new_with_size
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index 42f2f993fb..9c3164c96a 100644
--- a/hash.c
+++ b/hash.c
@@ -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)
{