summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-18 07:16:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-18 07:16:24 +0000
commit0eca22904bf18bdf864a7bb8dbce37ef14d35582 (patch)
treee5132713003f7f3e010d9609b301086615f66012 /include
parenta36367533c611b28c7391e79048879ecc5456fd3 (diff)
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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index cbd4044d75..f0d53b3e11 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -825,10 +825,12 @@ struct RObject {
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)