[前][次][番号順一覧][スレッド一覧]

ruby-changes:29982

From: ko1 <ko1@a...>
Date: Thu, 18 Jul 2013 14:54:45 +0900 (JST)
Subject: [ruby-changes:29982] ko1:r42034 (trunk): * array.c (ary_alloc): slim setup process.

ko1	2013-07-18 14:54:32 +0900 (Thu, 18 Jul 2013)

  New Revision: 42034

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42034

  Log:
    * array.c (ary_alloc): slim setup process.

  Modified files:
    trunk/ChangeLog
    trunk/array.c

Index: array.c
===================================================================
--- array.c	(revision 42033)
+++ array.c	(revision 42034)
@@ -378,10 +378,11 @@ rb_ary_shared_with_p(VALUE ary1, VALUE a https://github.com/ruby/ruby/blob/trunk/array.c#L378
 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;
 }
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 42033)
+++ ChangeLog	(revision 42034)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul 18 14:51:39 2013  Koichi Sasada  <ko1@a...>
+
+	* array.c (ary_alloc): slim setup process.
+
 Thu Jul 18 14:37:57 2013  Koichi Sasada  <ko1@a...>
 
 	* string.c (str_alloc): no need to clear RString (already cleared).

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]