summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-26 07:23:23 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-26 07:23:23 (GMT)
commit6b818dd9616ce6f0c849ab32c5869cc55b624b0a (patch)
tree57a01309af17a79bcf3f47f2bb95cf135fa955ca /hash.c
parent7e3bd6646ca88a285f0eb369a668c6596e0d6c83 (diff)
common conversion functions
* array.c (rb_to_array_type): make public to share common code internally. * hash.c (rb_to_hash_type): make public to share common code internally. * symbol.c (rb_to_symbol_type): make public to share common code internally. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index 23b01e8..a3c576d 100644
--- a/hash.c
+++ b/hash.c
@@ -712,11 +712,12 @@ rb_hash_s_create(int argc, VALUE *argv, VALUE klass)
return hash;
}
-static VALUE
-to_hash(VALUE hash)
+VALUE
+rb_to_hash_type(VALUE hash)
{
return rb_convert_type_with_id(hash, T_HASH, "Hash", idTo_hash);
}
+#define to_hash rb_to_hash_type
VALUE
rb_check_hash_type(VALUE hash)