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

* 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.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2013-08-07 07:19:57 +00:00
parent 8741a39777
commit 382abb7526
3 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,12 @@
Wed Aug 7 16:19:12 2013 Koichi Sasada <ko1@atdot.net>
* 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@atdot.net>
* random.c (random_load): use RARRAY_RAWPTR() instead of

5
cont.c
View file

@ -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);

6
proc.c
View file

@ -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);
}
}