[前][次][番号順一覧][スレッド一覧]

ruby-changes:64516

From: Nobuyoshi <ko1@a...>
Date: Wed, 23 Dec 2020 18:07:48 +0900 (JST)
Subject: [ruby-changes:64516] 313d63c2ac (master): Use rb_init_identtable instead of direct use of rb_hashtype_ident

https://git.ruby-lang.org/ruby.git/commit/?id=313d63c2ac

From 313d63c2ac447abc59a878dec0d619314d75449b Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 23 Dec 2020 18:06:27 +0900
Subject: Use rb_init_identtable instead of direct use of rb_hashtype_ident


diff --git a/gc.c b/gc.c
index e8c9afd..6f726b3 100644
--- a/gc.c
+++ b/gc.c
@@ -11152,7 +11152,6 @@ static const rb_data_type_t weakmap_type = { https://github.com/ruby/ruby/blob/trunk/gc.c#L11152
     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) https://github.com/ruby/ruby/blob/trunk/gc.c#L11159
 {
     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;
 }
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]