diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-20 14:17:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-20 14:17:16 +0000 |
commit | f2f08335df6a84ad82bba9defe7e5f3e7cfd8d55 (patch) | |
tree | c60fdd6e8593ab70974d6330a738c668658fc316 /thread.c | |
parent | cf82149d213c7e140bd6c50072598a2fa19af45b (diff) | |
download | ruby-f2f08335df6a84ad82bba9defe7e5f3e7cfd8d55.tar.gz |
* vm_core.h (struct rb_thread_struct): removed first_func_arg and
reuse first_args instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -321,7 +321,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s RARRAY_LEN(args), RARRAY_PTR(args)); } else { - th->value = (*th->first_func)(th->first_func_arg); + th->value = (*th->first_func)((void *)th->first_args); } }); } @@ -365,7 +365,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s } static VALUE -thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg) +thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS)) { rb_thread_t *th; VALUE thval; @@ -378,7 +378,6 @@ thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg) th->first_args = args; th->first_proc = fn ? Qfalse : rb_block_proc(); th->first_func = fn; - th->first_func_arg = arg; th->priority = GET_THREAD()->priority; @@ -402,13 +401,13 @@ thread_create_core(VALUE klass, VALUE args, VALUE (*fn)(ANYARGS), void *arg) static VALUE thread_s_new(VALUE klass, VALUE args) { - return thread_create_core(klass, args, 0, 0); + return thread_create_core(klass, args, 0); } VALUE rb_thread_create(VALUE (*fn)(ANYARGS), void *arg) { - return thread_create_core(rb_cThread, 0, fn, arg); + return thread_create_core(rb_cThread, (VALUE)arg, fn); } |