зеркало из https://github.com/github/ruby.git
* vm_eval.c (rb_apply): get rid of too large alloca.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d6ec675236
Коммит
0d6329343a
|
@ -1,3 +1,7 @@
|
|||
Fri Jul 29 23:53:44 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm_eval.c (rb_apply): get rid of too large alloca.
|
||||
|
||||
Fri Jul 29 20:48:39 2011 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/mkconstants.rb: fix typos.
|
||||
|
|
10
vm_eval.c
10
vm_eval.c
|
@ -597,9 +597,17 @@ VALUE
|
|||
rb_apply(VALUE recv, ID mid, VALUE args)
|
||||
{
|
||||
int argc;
|
||||
VALUE *argv;
|
||||
VALUE *argv, ret;
|
||||
|
||||
argc = RARRAY_LENINT(args);
|
||||
if (argc >= 0x100) {
|
||||
args = rb_ary_subseq(args, 0, argc);
|
||||
RBASIC(args)->klass = 0;
|
||||
OBJ_FREEZE(args);
|
||||
ret = rb_call(recv, mid, argc, RARRAY_PTR(args), CALL_FCALL);
|
||||
RB_GC_GUARD(args);
|
||||
return ret;
|
||||
}
|
||||
argv = ALLOCA_N(VALUE, argc);
|
||||
MEMCPY(argv, RARRAY_PTR(args), VALUE, argc);
|
||||
return rb_call(recv, mid, argc, argv, CALL_FCALL);
|
||||
|
|
Загрузка…
Ссылка в новой задаче