summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-21 07:20:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-12-21 07:20:23 +0000
commit1a4f41f05361505856573a55e64634b065f9d1b9 (patch)
treeaebc730195213f91e7593e4540f28383ef9229ab /ruby.h
parent3f9c58048f405cf06689054a4aa0ab1032e85813 (diff)
* dln.h, ruby.h, util.h: enable prototypes in C++.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/ruby.h b/ruby.h
index 82f215b240..d41e98c652 100644
--- a/ruby.h
+++ b/ruby.h
@@ -49,6 +49,15 @@ extern "C" {
# define volatile
#endif
+#ifdef __cplusplus
+# ifndef HAVE_PROTOTYPES
+# define HAVE_PROTOTYPES 1
+# endif
+# ifndef HAVE_STDARG_PROTOTYPES
+# define HAVE_STDARG_PROTOTYPES 1
+# endif
+#endif
+
#undef _
#ifdef HAVE_PROTOTYPES
# define _(args) args
@@ -545,7 +554,7 @@ EXTERN VALUE rb_eLoadError;
EXTERN VALUE rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo;
static inline VALUE
-#if defined(__cplusplus)
+#if defined(HAVE_PROTOTYPES)
rb_class_of(VALUE obj)
#else
rb_class_of(obj)
@@ -562,7 +571,7 @@ rb_class_of(obj)
}
static inline int
-#if defined(__cplusplus)
+#if defined(HAVE_PROTOTYPES)
rb_type(VALUE obj)
#else
rb_type(obj)
@@ -579,7 +588,7 @@ rb_type(obj)
}
static inline int
-#if defined(__cplusplus)
+#if defined(HAVE_PROTOTYPES)
rb_special_const_p(VALUE obj)
#else
rb_special_const_p(obj)