diff --git a/include/ruby/intern.h b/include/ruby/intern.h index f3d3c29fbc..c5a7f052db 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -474,7 +474,7 @@ VALUE rb_thread_wakeup(VALUE); VALUE rb_thread_wakeup_alive(VALUE); VALUE rb_thread_run(VALUE); VALUE rb_thread_kill(VALUE); -VALUE rb_thread_create(VALUE (*)(ANYARGS), void*); +VALUE rb_thread_create(VALUE (*)(void *), void*); int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *); void rb_thread_wait_for(struct timeval); VALUE rb_thread_current(void); diff --git a/thread.c b/thread.c index db4326bd31..57ccfef8b7 100644 --- a/thread.c +++ b/thread.c @@ -810,7 +810,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start) } static VALUE -thread_create_core(VALUE thval, VALUE args, VALUE (*fn)(ANYARGS)) +thread_create_core(VALUE thval, VALUE args, VALUE (*fn)(void *)) { rb_thread_t *th = rb_thread_ptr(thval), *current_th = GET_THREAD(); int err; @@ -944,7 +944,7 @@ thread_initialize(VALUE thread, VALUE args) } VALUE -rb_thread_create(VALUE (*fn)(ANYARGS), void *arg) +rb_thread_create(VALUE (*fn)(void *), void *arg) { return thread_create_core(rb_thread_alloc(rb_cThread), (VALUE)arg, fn); } diff --git a/thread_pthread.c b/thread_pthread.c index 39c3ed0ed4..cbe6aa028a 100644 --- a/thread_pthread.c +++ b/thread_pthread.c @@ -2156,7 +2156,7 @@ timer_pthread_fn(void *p) #endif /* UBF_TIMER_PTHREAD */ static VALUE -ubf_caller(const void *ignore) +ubf_caller(void *ignore) { rb_thread_sleep_forever(); diff --git a/vm_core.h b/vm_core.h index 74700f37f0..cb22fc4115 100644 --- a/vm_core.h +++ b/vm_core.h @@ -975,7 +975,7 @@ typedef struct rb_thread_struct { VALUE args; } proc; struct { - VALUE (*func)(ANYARGS); + VALUE (*func)(void *); void *arg; } func; } invoke_arg;