ruby-changes:65457
From: Nobuyoshi <ko1@a...>
Date: Fri, 12 Mar 2021 19:24:27 +0900 (JST)
Subject: [ruby-changes:65457] d91ade3e1e (master): Renamed functions for Fiber singleton methods
https://git.ruby-lang.org/ruby.git/commit/?id=d91ade3e1e From d91ade3e1e8e137d186a00158fb795e9c9ef99e5 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 12 Mar 2021 18:15:56 +0900 Subject: Renamed functions for Fiber singleton methods --- cont.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/cont.c b/cont.c index e029426..31f60d8 100644 --- a/cont.c +++ b/cont.c @@ -1904,7 +1904,7 @@ rb_fiber_new(rb_block_call_func_t func, VALUE obj) https://github.com/ruby/ruby/blob/trunk/cont.c#L1904 } static VALUE -rb_f_fiber_kw(int argc, VALUE* argv, int kw_splat) +rb_fiber_s_schedule_kw(int argc, VALUE* argv, int kw_splat) { rb_thread_t * th = GET_THREAD(); VALUE scheduler = th->scheduler; @@ -1962,9 +1962,9 @@ rb_f_fiber_kw(int argc, VALUE* argv, int kw_splat) https://github.com/ruby/ruby/blob/trunk/cont.c#L1962 * */ static VALUE -rb_f_fiber(int argc, VALUE *argv, VALUE obj) +rb_fiber_s_schedule(int argc, VALUE *argv, VALUE obj) { - return rb_f_fiber_kw(argc, argv, rb_keyword_given_p()); + return rb_fiber_s_schedule_kw(argc, argv, rb_keyword_given_p()); } /* @@ -1978,7 +1978,7 @@ rb_f_fiber(int argc, VALUE *argv, VALUE obj) https://github.com/ruby/ruby/blob/trunk/cont.c#L1978 * */ static VALUE -rb_fiber_scheduler(VALUE klass) +rb_fiber_s_scheduler(VALUE klass) { return rb_fiber_scheduler_get(); } @@ -2344,7 +2344,7 @@ rb_fiber_blocking_p(VALUE fiber) https://github.com/ruby/ruby/blob/trunk/cont.c#L2344 * */ static VALUE -rb_f_fiber_blocking_p(VALUE klass) +rb_fiber_s_blocking_p(VALUE klass) { rb_thread_t *thread = GET_THREAD(); unsigned blocking = thread->blocking; @@ -3074,12 +3074,11 @@ Init_Cont(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L3074 rb_define_method(rb_cFiber, "transfer", rb_fiber_m_transfer, -1); rb_define_method(rb_cFiber, "alive?", rb_fiber_alive_p, 0); - rb_define_singleton_method(rb_cFiber, "blocking?", rb_f_fiber_blocking_p, 0); - rb_define_singleton_method(rb_cFiber, "scheduler", rb_fiber_scheduler, 0); + rb_define_singleton_method(rb_cFiber, "blocking?", rb_fiber_s_blocking_p, 0); + rb_define_singleton_method(rb_cFiber, "scheduler", rb_fiber_s_scheduler, 0); rb_define_singleton_method(rb_cFiber, "set_scheduler", rb_fiber_set_scheduler, 1); - rb_define_singleton_method(rb_cFiber, "schedule", rb_f_fiber, -1); - //rb_define_global_function("Fiber", rb_f_fiber, -1); + rb_define_singleton_method(rb_cFiber, "schedule", rb_fiber_s_schedule, -1); #if 0 /* for RDoc */ rb_cFiberScheduler = rb_define_class_under(rb_cFiber, "SchedulerInterface", rb_cObject); -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/