diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-28 00:09:01 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-28 00:09:14 +0900 |
commit | 6a0d2bc2af7597e3e308c949e01c8e6329107b47 (patch) | |
tree | 4a07cda3bdb18483ae27e5958d63b65efead027f /spec/ruby/optional/capi/ext/thread_spec.c | |
parent | 4209066f0e2be775357d09cb513c89a2f064a335 (diff) | |
download | ruby-6a0d2bc2af7597e3e308c949e01c8e6329107b47.tar.gz |
Follows callback declaration updates
Diffstat (limited to 'spec/ruby/optional/capi/ext/thread_spec.c')
-rw-r--r-- | spec/ruby/optional/capi/ext/thread_spec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/optional/capi/ext/thread_spec.c b/spec/ruby/optional/capi/ext/thread_spec.c index 2f5678cfca..139652e326 100644 --- a/spec/ruby/optional/capi/ext/thread_spec.c +++ b/spec/ruby/optional/capi/ext/thread_spec.c @@ -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); } |