summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-20 13:53:23 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-20 13:53:23 +0000
commitc93b7404c1fe0995df074115806d2bea333610b1 (patch)
tree8898eddf4ab5871e48e8208891ecc9ba335a996d /thread.c
parent310ab79f5392f102ab0ef0434c8e25f203f9a287 (diff)
merge revision(s) 49386:
hash.c: move Hash specific functions * hash.c (rb_ident_hash): move compare_by_identity specific function from st.c. * hash.c (rb_ident_hash_new): ditto from thread.c. * st.c (st_numhash): remove ruby's Hash specific implementation. * thread.c (recursive_list_access): use rb_ident_hash_new(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/thread.c b/thread.c
index 35da97cde2..b7056a764d 100644
--- a/thread.c
+++ b/thread.c
@@ -4680,14 +4680,6 @@ rb_thread_shield_destroy(VALUE self)
}
static VALUE
-ident_hash_new(void)
-{
- VALUE hash = rb_hash_new();
- rb_hash_tbl_raw(hash)->type = &st_hashtype_num;
- return hash;
-}
-
-static VALUE
threadptr_recursive_hash(rb_thread_t *th)
{
return th->local_storage_recursive_hash;
@@ -4714,7 +4706,7 @@ recursive_list_access(VALUE sym)
VALUE hash = threadptr_recursive_hash(th);
VALUE list;
if (NIL_P(hash) || !RB_TYPE_P(hash, T_HASH)) {
- hash = ident_hash_new();
+ hash = rb_ident_hash_new();
threadptr_recursive_hash_set(th, hash);
list = Qnil;
}
@@ -4722,7 +4714,7 @@ recursive_list_access(VALUE sym)
list = rb_hash_aref(hash, sym);
}
if (NIL_P(list) || !RB_TYPE_P(list, T_HASH)) {
- list = ident_hash_new();
+ list = rb_ident_hash_new();
rb_hash_aset(hash, sym, list);
}
return list;