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

ruby-changes:66903

From: Nobuyoshi <ko1@a...>
Date: Tue, 27 Jul 2021 15:40:49 +0900 (JST)
Subject: [ruby-changes:66903] 82191da2a2 (master): Predefine recursive key ID

https://git.ruby-lang.org/ruby.git/commit/?id=82191da2a2

From 82191da2a28c8da0f1049ca6d814c9da992c39a1 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 27 Jul 2021 09:28:48 +0900
Subject: Predefine recursive key ID

---
 defs/id.def | 1 +
 thread.c    | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/defs/id.def b/defs/id.def
index cf359c1..506dc95 100644
--- a/defs/id.def
+++ b/defs/id.def
@@ -25,6 +25,7 @@ firstline, predefined = __LINE__+1, %[\ https://github.com/ruby/ruby/blob/trunk/defs/id.def#L25
   send
   __send__
   __attached__
+  __recursive_key__
   initialize
   initialize_copy
   initialize_clone
diff --git a/thread.c b/thread.c
index ec67bba..1232129 100644
--- a/thread.c
+++ b/thread.c
@@ -3484,7 +3484,7 @@ rb_thread_to_s(VALUE thread) https://github.com/ruby/ruby/blob/trunk/thread.c#L3484
 }
 
 /* variables for recursive traversals */
-static ID recursive_key;
+#define recursive_key id__recursive_key__
 
 static VALUE
 threadptr_local_aref(rb_thread_t *th, ID id)
@@ -5529,7 +5529,6 @@ Init_Thread(void) https://github.com/ruby/ruby/blob/trunk/thread.c#L5529
 	rb_define_const(cThGroup, "Default", th->thgroup);
     }
 
-    recursive_key = rb_intern_const("__recursive_key__");
     rb_eThreadError = rb_define_class("ThreadError", rb_eStandardError);
 
     /* init thread core */
-- 
cgit v1.1


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

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