From fed36e094a5cb42496e3ec1209737300dbfda7b6 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 27 Jan 2022 15:50:29 +0100 Subject: [PATCH] Fix callback type --- include/ruby/thread_native.h | 2 +- thread_pthread.c | 2 +- thread_win32.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ruby/thread_native.h b/include/ruby/thread_native.h index 80853d07fbd61e..7c4b24273fc685 100644 --- a/include/ruby/thread_native.h +++ b/include/ruby/thread_native.h @@ -214,7 +214,7 @@ typedef struct gvl_hook { struct gvl_hook *next; } gvl_hook_t; -gvl_hook_t * rb_gvl_event_new(void *callback, rb_event_flag_t event); +gvl_hook_t * rb_gvl_event_new(rb_gvl_callback callback, rb_event_flag_t event); bool rb_gvl_event_delete(gvl_hook_t * hook); RBIMPL_SYMBOL_EXPORT_END() #endif diff --git a/thread_pthread.c b/thread_pthread.c index 8c874df0a31f34..2e581a10a81c28 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -105,7 +105,7 @@ static gvl_hook_t * rb_gvl_hooks = NULL; static pthread_rwlock_t rb_gvl_hooks_rw_lock = PTHREAD_RWLOCK_INITIALIZER; gvl_hook_t * -rb_gvl_event_new(void *callback, rb_event_flag_t event) { +rb_gvl_event_new(rb_gvl_callback callback, rb_event_flag_t event) { gvl_hook_t *hook = ALLOC_N(gvl_hook_t, 1); hook->callback = callback; hook->event = event; diff --git a/thread_win32.c b/thread_win32.c index 527aae1f566dd1..6838820084aa36 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -36,7 +36,7 @@ static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES; static int w32_wait_events(HANDLE *events, int count, DWORD timeout, rb_thread_t *th); gvl_hook_t * -rb_gvl_event_new(void *callback, rb_event_flag_t event) { +rb_gvl_event_new(rb_gvl_callback callback, rb_event_flag_t event) { // not implemented yet }