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

ruby-changes:39542

From: nobu <ko1@a...>
Date: Tue, 18 Aug 2015 16:16:35 +0900 (JST)
Subject: [ruby-changes:39542] nobu:r51623 (trunk): ruby.h: define RClass only in C

nobu	2015-08-18 16:16:24 +0900 (Tue, 18 Aug 2015)

  New Revision: 51623

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

  Log:
    ruby.h: define RClass only in C
    
    * include/ruby/ruby.h (RClass): define only in C, `__attribute__`
      between `struct` and the name can't compile with g++.
      [ruby-core:70297] [Bug #11426]

  Modified files:
    trunk/ChangeLog
    trunk/include/ruby/ruby.h
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 51622)
+++ include/ruby/ruby.h	(revision 51623)
@@ -825,10 +825,12 @@ struct RObject { https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L825
      ROBJECT(o)->as.heap.iv_index_tbl)
 
 #define RClass RClassDeprecated
-struct DEPRECATED_TYPE(("RClass is internal use only"),
-RClass {
+#ifndef __cplusplus
+DEPRECATED_TYPE(("RClass is internal use only"),
+struct RClass {
     struct RBasic basic;
 });
+#endif
 #define RCLASS_SUPER(c) rb_class_get_superclass(c)
 #define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
 #define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51622)
+++ ChangeLog	(revision 51623)
@@ -1,7 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
-Tue Aug 18 11:40:51 2015  Nobuyoshi Nakada  <nobu@r...>
+Tue Aug 18 16:16:21 2015  Nobuyoshi Nakada  <nobu@r...>
 
-	* include/ruby/ruby.h (RClass): move `__attribute__` after the
-	  keyword `struct` for g++.  [ruby-core:70297] [Bug #11426]
+	* include/ruby/ruby.h (RClass): define only in C, `__attribute__`
+	  between `struct` and the name can't compile with g++.
+	  [ruby-core:70297] [Bug #11426]
 
 Mon Aug 17 20:56:36 2015  Nobuyoshi Nakada  <nobu@r...>
 

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

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