From ce7942361d1f1f9a1ca958b6979a432da2014683 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 18 Oct 2019 02:51:15 +0900 Subject: Use identhash as WeakMap As ObjectSpace::WeakMap allows FLONUM as a key, needs the special deal for its hash. [Feature #16035] --- hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hash.c') 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, }; -- cgit v1.2.3