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

ruby-changes:41831

From: nobu <ko1@a...>
Date: Tue, 23 Feb 2016 16:58:40 +0900 (JST)
Subject: [ruby-changes:41831] nobu:r53905 (trunk): iseq.h: remove trailing comma

nobu	2016-02-23 16:59:17 +0900 (Tue, 23 Feb 2016)

  New Revision: 53905

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53905

  Log:
    iseq.h: remove trailing comma
    
    * iseq.h (iseq_mark_ary_index): get rid of trailing comma and name
      the magic number for iseq_mark_ary_create.

  Modified files:
    trunk/iseq.h
Index: iseq.h
===================================================================
--- iseq.h	(revision 53904)
+++ iseq.h	(revision 53905)
@@ -27,15 +27,16 @@ rb_call_info_kw_arg_bytes(int keyword_le https://github.com/ruby/ruby/blob/trunk/iseq.h#L27
 }
 
 enum iseq_mark_ary_index {
-    ISEQ_MARK_ARY_COVERAGE      = 0,
-    ISEQ_MARK_ARY_FLIP_CNT      = 1,
-    ISEQ_MARK_ARY_ORIGINAL_ISEQ = 2,
+    ISEQ_MARK_ARY_COVERAGE,
+    ISEQ_MARK_ARY_FLIP_CNT,
+    ISEQ_MARK_ARY_ORIGINAL_ISEQ,
+    ISEQ_MARK_ARY_INITIAL_SIZE
 };
 
 static inline VALUE
 iseq_mark_ary_create(int flip_cnt)
 {
-    VALUE ary = rb_ary_tmp_new(3);
+    VALUE ary = rb_ary_tmp_new(ISEQ_MARK_ARY_INITIAL_SIZE);
     rb_ary_push(ary, Qnil);              /* ISEQ_MARK_ARY_COVERAGE */
     rb_ary_push(ary, INT2FIX(flip_cnt)); /* ISEQ_MARK_ARY_FLIP_CNT */
     rb_ary_push(ary, Qnil);              /* ISEQ_MARK_ARY_ORIGINAL_ISEQ */

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

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