зеркало из https://github.com/github/ruby.git
* array.c (ary_alloc): slim setup process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7497452930
Коммит
6429bbad59
|
@ -1,3 +1,7 @@
|
|||
Thu Jul 18 14:51:39 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* array.c (ary_alloc): slim setup process.
|
||||
|
||||
Thu Jul 18 14:37:57 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* string.c (str_alloc): no need to clear RString (already cleared).
|
||||
|
|
9
array.c
9
array.c
|
@ -378,10 +378,11 @@ rb_ary_shared_with_p(VALUE ary1, VALUE ary2)
|
|||
static VALUE
|
||||
ary_alloc(VALUE klass)
|
||||
{
|
||||
NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
|
||||
FL_SET_EMBED((VALUE)ary);
|
||||
ARY_SET_EMBED_LEN((VALUE)ary, 0);
|
||||
|
||||
NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
|
||||
/* Created array is:
|
||||
* FL_SET_EMBED((VALUE)ary);
|
||||
* ARY_SET_EMBED_LEN((VALUE)ary, 0);
|
||||
*/
|
||||
return (VALUE)ary;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче