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

ruby-changes:26302

From: nobu <ko1@a...>
Date: Thu, 13 Dec 2012 12:50:29 +0900 (JST)
Subject: [ruby-changes:26302] nobu:r38353 (trunk): * method.h (END_OF_ENUMERATION): placeholder to put last comma.

nobu	2012-12-13 12:50:19 +0900 (Thu, 13 Dec 2012)

  New Revision: 38353

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

  Log:
    * method.h (END_OF_ENUMERATION): placeholder to put last comma.

  Modified files:
    trunk/method.h

Index: method.h
===================================================================
--- method.h	(revision 38352)
+++ method.h	(revision 38353)
@@ -11,6 +11,14 @@ https://github.com/ruby/ruby/blob/trunk/method.h#L11
 #ifndef METHOD_H
 #define METHOD_H
 
+#ifndef END_OF_ENUMERATION
+# ifdef __GNUC__
+#   define END_OF_ENUMERATION(key)
+# else
+#   define END_OF_ENUMERATION(key) END_OF_##key##_PLACEHOLDER = 0
+# endif
+#endif
+
 typedef enum {
     NOEX_PUBLIC    = 0x00,
     NOEX_NOSUPER   = 0x01,
@@ -46,7 +54,9 @@ typedef enum { https://github.com/ruby/ruby/blob/trunk/method.h#L54
     VM_METHOD_TYPE_OPTIMIZED, /* Kernel#send, Proc#call, etc */
     VM_METHOD_TYPE_MISSING,   /* wrapper for method_missing(id) */
     VM_METHOD_TYPE_CFUNC_FRAMELESS,
-    VM_METHOD_TYPE_REFINED
+    VM_METHOD_TYPE_REFINED,
+
+    END_OF_ENUMERATION(VM_METHOD_TYPE)
 } rb_method_type_t;
 
 struct rb_call_info_struct;

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

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