ruby-changes:63644
From: Kazuhiro <ko1@a...>
Date: Wed, 18 Nov 2020 10:56:01 +0900 (JST)
Subject: [ruby-changes:63644] a776032ef1 (master): Move the declaration into the function
https://git.ruby-lang.org/ruby.git/commit/?id=a776032ef1 From a776032ef183d6bc1236b2306ada5611b4d6849f Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Wed, 18 Nov 2020 10:52:56 +0900 Subject: Move the declaration into the function instead of 'do not call it directly.' comment. diff --git a/include/ruby/ractor.h b/include/ruby/ractor.h index 6908c0a..3b4552e 100644 --- a/include/ruby/ractor.h +++ b/include/ruby/ractor.h @@ -22,8 +22,6 @@ void rb_ractor_stdin_set(VALUE); https://github.com/ruby/ruby/blob/trunk/include/ruby/ractor.h#L22 void rb_ractor_stdout_set(VALUE); void rb_ractor_stderr_set(VALUE); -bool rb_ractor_shareable_p_continue(VALUE obj); // do not call it directly. - RUBY_SYMBOL_EXPORT_END #define RB_OBJ_SHAREABLE_P(obj) FL_TEST_RAW((obj), RUBY_FL_SHAREABLE) @@ -31,6 +29,8 @@ RUBY_SYMBOL_EXPORT_END https://github.com/ruby/ruby/blob/trunk/include/ruby/ractor.h#L29 static inline bool rb_ractor_shareable_p(VALUE obj) { + bool rb_ractor_shareable_p_continue(VALUE obj); + if (SPECIAL_CONST_P(obj)) { return true; } diff --git a/ractor_core.h b/ractor_core.h index 41bd14f..07528cc 100644 --- a/ractor_core.h +++ b/ractor_core.h @@ -160,6 +160,10 @@ void rb_ractor_terminate_interrupt_main_thread(rb_ractor_t *r); https://github.com/ruby/ruby/blob/trunk/ractor_core.h#L160 void rb_ractor_terminate_all(void); bool rb_ractor_main_p_(void); +RUBY_SYMBOL_EXPORT_BEGIN +bool rb_ractor_shareable_p_continue(VALUE obj); +RUBY_SYMBOL_EXPORT_END + RUBY_EXTERN bool ruby_multi_ractor; static inline bool -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/