summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-23 11:01:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-23 11:01:02 +0000
commite567f351c287dcfdf1c25518cca140d661c01985 (patch)
tree4e464e9dbc9e001c5f4fab5b9a65dafca26ae9e1 /hash.c
parentbb7830c7d4026d3f9022bc3046c8591b5f9221ae (diff)
marshal.c: indetity tables
* marshal.c (w_object, marshal_dump): use indetity tables for arbitrary VALUE keys, because of performance of FLONUM. [Bug #10761] * marshal.c (obj_alloc_by_klass, marshal_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index bae417c642..454ded20fd 100644
--- a/hash.c
+++ b/hash.c
@@ -2549,6 +2549,18 @@ rb_ident_hash_new(void)
return hash;
}
+st_table *
+rb_init_identtable(void)
+{
+ return st_init_table(&identhash);
+}
+
+st_table *
+rb_init_identtable_with_size(st_index_t size)
+{
+ return st_init_table_with_size(&identhash, size);
+}
+
static int
any_p_i(VALUE key, VALUE value, VALUE arg)
{