diff --git a/ChangeLog b/ChangeLog index ef59c290f9..b9e85fb829 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Aug 7 16:19:12 2013 Koichi Sasada + + * cont.c (rb_fiber_start): use RARRAY_RAWPTR() instead of + RARRAY_PTR() because there is no new reference. + + * proc.c (curry): ditto. + + * proc.c (rb_proc_call): remove line break. + Wed Aug 7 13:20:12 2013 Koichi Sasada * random.c (random_load): use RARRAY_RAWPTR() instead of diff --git a/cont.c b/cont.c index 61726f12c2..983271d5eb 100644 --- a/cont.c +++ b/cont.c @@ -1149,10 +1149,9 @@ rb_fiber_start(void) TH_PUSH_TAG(th); if ((state = EXEC_TAG()) == 0) { int argc; - VALUE *argv, args; + const VALUE *argv, args = cont->value; GetProcPtr(cont->saved_thread.first_proc, proc); - args = cont->value; - argv = (argc = cont->argc) > 1 ? RARRAY_PTR(args) : &args; + argv = (argc = cont->argc) > 1 ? RARRAY_RAWPTR(args) : &args; cont->value = Qnil; th->errinfo = Qnil; th->root_lep = rb_vm_ep_local_ep(proc->block.ep); diff --git a/proc.c b/proc.c index a180b7a480..a27a66c0f5 100644 --- a/proc.c +++ b/proc.c @@ -594,8 +594,7 @@ rb_proc_call(VALUE self, VALUE args) VALUE vret; rb_proc_t *proc; GetProcPtr(self, proc); - vret = rb_vm_invoke_proc(GET_THREAD(), proc, - check_argc(RARRAY_LEN(args)), RARRAY_PTR(args), 0); + vret = rb_vm_invoke_proc(GET_THREAD(), proc, check_argc(RARRAY_LEN(args)), RARRAY_RAWPTR(args), 0); RB_GC_GUARD(self); RB_GC_GUARD(args); return vret; @@ -2264,8 +2263,7 @@ curry(VALUE dummy, VALUE args, int argc, VALUE *argv, VALUE passed_proc) return arity; } else { - return rb_proc_call_with_block(proc, check_argc(RARRAY_LEN(passed)), - RARRAY_PTR(passed), passed_proc); + return rb_proc_call_with_block(proc, check_argc(RARRAY_LEN(passed)), RARRAY_RAWPTR(passed), passed_proc); } }