rb_thread_create now free from ANYARGS
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_thread_create, which seems very safe to do.
This commit is contained in:
parent
bc3e7924bc
commit
e3fc30564e
@ -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);
|
||||
|
4
thread.c
4
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);
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user