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

ruby-changes:5564

From: nobu <ko1@a...>
Date: Tue, 10 Jun 2008 12:47:44 +0900 (JST)
Subject: [ruby-changes:5564] Ruby:r17068 (trunk): * include/ruby/ruby.h (CONST_ID_CACHE): fixed statement expression.

nobu	2008-06-10 12:43:33 +0900 (Tue, 10 Jun 2008)

  New Revision: 17068

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h

  Log:
    * include/ruby/ruby.h (CONST_ID_CACHE): fixed statement expression.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/ruby.h?r1=17068&r2=17067&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17068&r2=17067&diff_format=u

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 17067)
+++ include/ruby/ruby.h	(revision 17068)
@@ -765,20 +765,20 @@
 VALUE rb_id2str(ID);
 
 #define CONST_ID_CACHE(result, str)			\
-    ({							\
+    {							\
 	static ID rb_intern_id_cache;			\
 	if (!rb_intern_id_cache)			\
 	    rb_intern_id_cache = (rb_intern)(str);	\
 	result rb_intern_id_cache;			\
-    })
+    }
 #define CONST_ID(var, str) \
-    do {CONST_ID_CACHE(var =, str);} while (0)
+    do CONST_ID_CACHE(var =, str) while (0)
 #ifdef __GNUC__
 /* __builtin_constant_p and statement expression is available
  * since gcc-2.7.2.3 at least. */
 #define rb_intern(str) \
     (__builtin_constant_p(str) ? \
-        CONST_ID_CACHE(/**/, str) : \
+        (CONST_ID_CACHE(/**/, str)) : \
         rb_intern(str))
 #endif
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17067)
+++ ChangeLog	(revision 17068)
@@ -1,3 +1,7 @@
+Tue Jun 10 12:43:19 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/ruby.h (CONST_ID_CACHE): fixed statement expression.
+
 Tue Jun 10 11:25:15 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* ruby.c (rb_argv0): revised for ext/tk.

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

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