* 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:
ko1 2013-07-18 05:54:32 +00:00
parent 7497452930
commit 6429bbad59
2 changed files with 9 additions and 4 deletions

View File

@ -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> Thu Jul 18 14:37:57 2013 Koichi Sasada <ko1@atdot.net>
* string.c (str_alloc): no need to clear RString (already cleared). * string.c (str_alloc): no need to clear RString (already cleared).

View File

@ -378,10 +378,11 @@ rb_ary_shared_with_p(VALUE ary1, VALUE ary2)
static VALUE static VALUE
ary_alloc(VALUE klass) ary_alloc(VALUE klass)
{ {
NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0)); NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
FL_SET_EMBED((VALUE)ary); /* Created array is:
ARY_SET_EMBED_LEN((VALUE)ary, 0); * FL_SET_EMBED((VALUE)ary);
* ARY_SET_EMBED_LEN((VALUE)ary, 0);
*/
return (VALUE)ary; return (VALUE)ary;
} }