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

ruby-changes:32891

From: nagachika <ko1@a...>
Date: Sat, 15 Feb 2014 16:53:35 +0900 (JST)
Subject: [ruby-changes:32891] nagachika:r44970 (ruby_2_0_0): merge revision(s) r40270:

nagachika	2014-02-15 16:53:31 +0900 (Sat, 15 Feb 2014)

  New Revision: 44970

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

  Log:
    merge revision(s) r40270:
    
    * struct.c (rb_struct_define_without_accessor, rb_struct_define),
      (rb_struct_s_def): hide member names array.

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/struct.c
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/struct.c
===================================================================
--- ruby_2_0_0/struct.c	(revision 44969)
+++ ruby_2_0_0/struct.c	(revision 44970)
@@ -243,7 +243,7 @@ rb_struct_define_without_accessor(const https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/struct.c#L243
     VALUE members;
     char *name;
 
-    members = rb_ary_new2(0);
+    members = rb_ary_tmp_new(0);
     va_start(ar, alloc);
     while ((name = va_arg(ar, char*)) != NULL) {
         rb_ary_push(members, ID2SYM(rb_intern(name)));
@@ -275,7 +275,7 @@ rb_struct_define(const char *name, ...) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/struct.c#L275
     VALUE st, ary;
     char *mem;
 
-    ary = rb_ary_new();
+    ary = rb_ary_tmp_new(0);
 
     va_start(ar, name);
     while ((mem = va_arg(ar, char*)) != 0) {
@@ -351,7 +351,7 @@ rb_struct_s_def(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/struct.c#L351
 	--argc;
 	++argv;
     }
-    rest = rb_ary_new2(argc);
+    rest = rb_ary_tmp_new(argc);
     for (i=0; i<argc; i++) {
 	id = rb_to_id(argv[i]);
 	RARRAY_PTR(rest)[i] = ID2SYM(id);
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 44969)
+++ ruby_2_0_0/version.h	(revision 44970)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2014-02-15"
-#define RUBY_PATCHLEVEL 405
+#define RUBY_PATCHLEVEL 406
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 2

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r40270


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

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