aboutsummaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-18 02:51:15 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-18 14:53:51 +0900
commitce7942361d1f1f9a1ca958b6979a432da2014683 (patch)
tree6fc55794a67b3e6006833383cf8af550040c6167 /hash.c
parentc3b64a86bcd7773c081f5049115c57ec73d7a76a (diff)
downloadruby-ce7942361d1f1f9a1ca958b6979a432da2014683.tar.gz
Use identhash as WeakMap
As ObjectSpace::WeakMap allows FLONUM as a key, needs the special deal for its hash. [Feature #16035]
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 9b5f978dd9..b73ade7c01 100644
--- a/hash.c
+++ b/hash.c
@@ -330,7 +330,8 @@ rb_ident_hash(st_data_t n)
return (st_index_t)st_index_hash((st_index_t)n);
}
-static const struct st_hash_type identhash = {
+#define identhash rb_hashtype_ident
+const struct st_hash_type rb_hashtype_ident = {
rb_ident_cmp,
rb_ident_hash,
};