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

ruby-changes:71398

From: Nobuyoshi <ko1@a...>
Date: Sun, 13 Mar 2022 21:10:13 +0900 (JST)
Subject: [ruby-changes:71398] e081f333fe (master): Fix experimental Fiber::Pool definition

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

From e081f333fe0c0fa7c1b5784e9472d1c81befb720 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 13 Mar 2022 21:07:49 +0900
Subject: Fix experimental Fiber::Pool definition

Toplevel `Pool` is too generic, and `struct fiber_pool` does not
seem compatible with `rb_fiber_t`.
---
 cont.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cont.c b/cont.c
index f9ebb4483e..e78582a99a 100644
--- a/cont.c
+++ b/cont.c
@@ -3279,7 +3279,7 @@ Init_Cont(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L3279
 #endif
 
 #ifdef RB_EXPERIMENTAL_FIBER_POOL
-    rb_cFiberPool = rb_define_class("Pool", rb_cFiber);
+    rb_cFiberPool = rb_define_class_under(rb_cFiber, "Pool", rb_cObject);
     rb_define_alloc_func(rb_cFiberPool, fiber_pool_alloc);
     rb_define_method(rb_cFiberPool, "initialize", rb_fiber_pool_initialize, -1);
 #endif
-- 
cgit v1.2.1


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

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