зеркало из https://github.com/github/ruby.git
* 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:
Родитель
8741a39777
Коммит
382abb7526
|
@ -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
5
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);
|
||||
|
|
6
proc.c
6
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче