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

ruby-changes:27812

From: nobu <ko1@a...>
Date: Thu, 21 Mar 2013 23:32:27 +0900 (JST)
Subject: [ruby-changes:27812] nobu:r39864 (trunk): revert r39861

nobu	2013-03-21 23:32:17 +0900 (Thu, 21 Mar 2013)

  New Revision: 39864

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

  Log:
    revert r39861
    
    * include/ruby/ruby.h: revert r39861 because RB_UNUSED_VAR() is used
      for array variables in extension libraries.

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

Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 39863)
+++ include/ruby/ruby.h	(revision 39864)
@@ -529,10 +529,8 @@ static inline volatile VALUE *rb_gc_guar https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L529
 #endif
 #define RB_GC_GUARD(v) (*RB_GC_GUARD_PTR(&(v)))
 
-#if (defined(__clang__) && (__clang_major__ == 4 && __clang_minor__ == 2))
+#ifdef __GNUC__
 #define RB_UNUSED_VAR(x) x __attribute__ ((unused))
-#elif defined(__GNUC__) && __GNUC__ >= 3
-#define RB_UNUSED_VAR(x) x = x
 #else
 #define RB_UNUSED_VAR(x) x
 #endif
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39863)
+++ ChangeLog	(revision 39864)
@@ -3,13 +3,6 @@ Thu Mar 21 23:17:08 2013  Nobuyoshi Naka https://github.com/ruby/ruby/blob/trunk/ChangeLog#L3
 	* thread.c (ruby_kill): get rid of deadlock on signal 0.
 	  [ruby-dev:47182] [Bug #8137]
 
-Thu Mar 21 23:14:15 2013  Nobuyoshi Nakada  <nobu@r...>
-
-	* include/ruby/ruby.h (RB_UNUSED_VAR): move code from
-	  UNINITIALIZED_VAR() in vm_core.h.
-
-	* vm_core.h (UNINITIALIZED_VAR): use RB_UNUSED_VAR().
-
 Thu Mar 21 22:39:46 2013  Naohisa Goto  <ngotogenome@g...>
 
 	* marshal.c (marshal_dump, marshal_load): workaround for segv on
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 39863)
+++ vm_core.h	(revision 39864)
@@ -115,7 +115,13 @@ https://github.com/ruby/ruby/blob/trunk/vm_core.h#L115
 #define UNLIKELY(x) (x)
 #endif /* __GNUC__ >= 3 */
 
-#define UNINITIALIZED_VAR(x) RB_UNUSED_VAR(x)
+#if (defined(__clang__) && (__clang_major__ == 4 && __clang_minor__ == 2))
+#define UNINITIALIZED_VAR(x) x __attribute__((unused))
+#elif defined(__GNUC__) && __GNUC__ >= 3
+#define UNINITIALIZED_VAR(x) x = x
+#else
+#define UNINITIALIZED_VAR(x) x
+#endif
 
 typedef unsigned long rb_num_t;
 

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

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