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

ruby-changes:9440

From: nobu <ko1@a...>
Date: Thu, 25 Dec 2008 05:53:21 +0900 (JST)
Subject: [ruby-changes:9440] Ruby:r20978 (trunk): * template/id.h.tmpl, id.h (ruby_method_ids_check): enclosed in a

nobu	2008-12-25 05:53:06 +0900 (Thu, 25 Dec 2008)

  New Revision: 20978

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

  Log:
    * template/id.h.tmpl, id.h (ruby_method_ids_check): enclosed in a
      struct.

  Modified files:
    trunk/ChangeLog
    trunk/id.h
    trunk/template/id.h.tmpl

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20977)
+++ ChangeLog	(revision 20978)
@@ -1,8 +1,11 @@
-Thu Dec 25 05:05:06 2008  Nobuyoshi Nakada  <nobu@r...>
+Thu Dec 25 05:53:01 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* template/id.h.tmpl, id.h (ruby_method_ids): not depend on if
 	  token are defined as macros.  [ruby-dev:37553]
 
+	* template/id.h.tmpl, id.h (ruby_method_ids_check): enclosed in a
+	  struct.
+
 Thu Dec 25 01:52:34 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* thread.c (thread_start_func_2): sets native thread key.
Index: id.h
===================================================================
--- id.h	(revision 20977)
+++ id.h	(revision 20978)
@@ -122,8 +122,9 @@
 };
 
 #ifdef tLAST_TOKEN
+struct ruby_method_ids_check {
 #define ruby_method_id_check_for(name, value) \
-    typedef int ruby_method_id_check_for_##name[name == value ? 1 : -1]
+    int checking_for_##name[name == value ? 1 : -1]
 ruby_method_id_check_for(tUPLUS, 321);
 ruby_method_id_check_for(tUMINUS, 322);
 ruby_method_id_check_for(tPOW, 323);
@@ -156,6 +157,7 @@
 ruby_method_id_check_for(id_core_define_singleton_method, 374);
 ruby_method_id_check_for(id_core_set_postexe, 375);
 ruby_method_id_check_for(tLAST_TOKEN, 376);
+};
 #endif
 
 #endif /* RUBY_ID_H */
Index: template/id.h.tmpl
===================================================================
--- template/id.h.tmpl	(revision 20977)
+++ template/id.h.tmpl	(revision 20978)
@@ -115,11 +115,13 @@
 };
 
 #ifdef tLAST_TOKEN
+struct ruby_method_ids_check {
 #define ruby_method_id_check_for(name, value) \
-    typedef int ruby_method_id_check_for_##name[name == value ? 1 : -1]
+    int checking_for_##name[name == value ? 1 : -1]
 % tokens.map do |token, value|
 ruby_method_id_check_for(<%=token%>, <%=value%>);
 % end
+};
 #endif
 
 #endif /* RUBY_ID_H */

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

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