ruby-changes:30351
From: ko1 <ko1@a...>
Date: Wed, 7 Aug 2013 16:20:06 +0900 (JST)
Subject: [ruby-changes:30351] ko1:r42420 (trunk): * cont.c (rb_fiber_start): use RARRAY_RAWPTR() instead of
ko1 2013-08-07 16:19:57 +0900 (Wed, 07 Aug 2013) New Revision: 42420 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42420 Log: * 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. Modified files: trunk/ChangeLog trunk/cont.c trunk/proc.c _______________________________________________ ruby-cvs mailing list ruby-cvs@r... http://lists.ruby-lang.org/cgi-bin/mailman/listinfo/ruby-cvs Index: ChangeLog =================================================================== --- ChangeLog (revision 42419) +++ ChangeLog (revision 42420) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 7 16:19:12 2013 Koichi Sasada <ko1@a...> + + * 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 <ko1@a...> * random.c (random_load): use RARRAY_RAWPTR() instead of Index: proc.c =================================================================== --- proc.c (revision 42419) +++ proc.c (revision 42420) @@ -594,8 +594,7 @@ rb_proc_call(VALUE self, VALUE args) https://github.com/ruby/ruby/blob/trunk/proc.c#L594 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, https://github.com/ruby/ruby/blob/trunk/proc.c#L2263 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); } } Index: cont.c =================================================================== --- cont.c (revision 42419) +++ cont.c (revision 42420) @@ -1149,10 +1149,9 @@ rb_fiber_start(void) https://github.com/ruby/ruby/blob/trunk/cont.c#L1149 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/