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

ruby-changes:72239

From: Nobuyoshi <ko1@a...>
Date: Sun, 19 Jun 2022 23:39:59 +0900 (JST)
Subject: [ruby-changes:72239] 4aebbf44e9 (master): Remove unnecessary `*` before the function name

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

From 4aebbf44e9032750bee074092a4386fc664ea866 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sun, 19 Jun 2022 23:32:47 +0900
Subject: Remove unnecessary `*` before the function name

---
 ext/-test-/thread/instrumentation/instrumentation.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ext/-test-/thread/instrumentation/instrumentation.c b/ext/-test-/thread/instrumentation/instrumentation.c
index 1251029327..517af7e339 100644
--- a/ext/-test-/thread/instrumentation/instrumentation.c
+++ b/ext/-test-/thread/instrumentation/instrumentation.c
@@ -11,7 +11,7 @@ static rb_atomic_t exited_count = 0; https://github.com/ruby/ruby/blob/trunk/ext/-test-/thread/instrumentation/instrumentation.c#L11
 void
 ex_callback(rb_event_flag_t event, const rb_internal_thread_event_data_t *event_data, void *user_data)
 {
-    switch(event) {
+    switch (event) {
       case RUBY_INTERNAL_THREAD_EVENT_STARTED:
         RUBY_ATOMIC_INC(started_count);
         break;
@@ -59,7 +59,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/-test-/thread/instrumentation/instrumentation.c#L59
 thread_register_callback(VALUE thread)
 {
     single_hook = rb_internal_thread_add_event_hook(
-        *ex_callback,
+        ex_callback,
         RUBY_INTERNAL_THREAD_EVENT_STARTED |
         RUBY_INTERNAL_THREAD_EVENT_READY |
         RUBY_INTERNAL_THREAD_EVENT_RESUMED |
@@ -87,7 +87,7 @@ thread_register_and_unregister_callback(VALUE thread) https://github.com/ruby/ruby/blob/trunk/ext/-test-/thread/instrumentation/instrumentation.c#L87
 {
     rb_internal_thread_event_hook_t * hooks[5];
     for (int i = 0; i < 5; i++) {
-        hooks[i] = rb_internal_thread_add_event_hook(*ex_callback, RUBY_INTERNAL_THREAD_EVENT_READY, NULL);
+        hooks[i] = rb_internal_thread_add_event_hook(ex_callback, RUBY_INTERNAL_THREAD_EVENT_READY, NULL);
     }
 
     if (!rb_internal_thread_remove_event_hook(hooks[4])) return Qfalse;
-- 
cgit v1.2.1


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

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