diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-12-23 18:06:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-12-23 18:06:27 +0900 |
commit | 313d63c2ac447abc59a878dec0d619314d75449b (patch) | |
tree | 32ef202592f1ae40b8a2d93473aaf123465baff4 | |
parent | e052d0716325bcb499c57b1de0c6e3eb9effb299 (diff) |
Use rb_init_identtable instead of direct use of rb_hashtype_ident
-rw-r--r-- | gc.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -11152,7 +11152,6 @@ static const rb_data_type_t weakmap_type = { 0, 0, RUBY_TYPED_FREE_IMMEDIATELY }; -extern const struct st_hash_type rb_hashtype_ident; static VALUE wmap_finalize(RB_BLOCK_CALL_FUNC_ARGLIST(objid, self)); static VALUE @@ -11160,8 +11159,8 @@ wmap_allocate(VALUE klass) { struct weakmap *w; VALUE obj = TypedData_Make_Struct(klass, struct weakmap, &weakmap_type, w); - w->obj2wmap = st_init_table(&rb_hashtype_ident); - w->wmap2obj = st_init_table(&rb_hashtype_ident); + w->obj2wmap = rb_init_identtable(); + w->wmap2obj = rb_init_identtable(); w->final = rb_func_lambda_new(wmap_finalize, obj, 1, 1); return obj; } |