1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Follows callback declaration updates

This commit is contained in:
Nobuyoshi Nakada 2019-08-28 00:09:01 +09:00
parent 4209066f0e
commit 6a0d2bc2af
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
4 changed files with 16 additions and 11 deletions

View file

@ -114,7 +114,8 @@ static VALUE thread_spec_rb_thread_wait_for(VALUE self, VALUE s, VALUE ms) {
}
VALUE thread_spec_call_proc(VALUE arg_array) {
VALUE thread_spec_call_proc(void *arg_ptr) {
VALUE arg_array = (VALUE)arg_ptr;
VALUE arg = rb_ary_pop(arg_array);
VALUE proc = rb_ary_pop(arg_array);
return rb_funcall(proc, rb_intern("call"), 1, arg);
@ -125,7 +126,7 @@ static VALUE thread_spec_rb_thread_create(VALUE self, VALUE proc, VALUE arg) {
rb_ary_push(args, proc);
rb_ary_push(args, arg);
return rb_thread_create((VALUE (*)(void *))thread_spec_call_proc, (void*)args);
return rb_thread_create(thread_spec_call_proc, (void*)args);
}