summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-26 08:08:50 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-26 08:08:50 +0000
commita5dcc4437e3354996f8242503d678f0eb5193809 (patch)
treec068f2e637141759cd50649e15e86eaabafe9b36 /ruby.h
parentc101164b0225b777b2d8521fad29352087b996e3 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/ruby.h b/ruby.h
index ca97ee2..9784fc6 100644
--- a/ruby.h
+++ b/ruby.h
@@ -541,12 +541,15 @@ EXTERN VALUE rb_eNameError;
EXTERN VALUE rb_eSyntaxError;
EXTERN VALUE rb_eLoadError;
-#if defined(__GNUC__) && __GNUC__ >= 2 && !defined(RUBY_NO_INLINE)
-extern __inline__ VALUE rb_class_of _((VALUE));
-extern __inline__ int rb_type _((VALUE));
-extern __inline__ int rb_special_const_p _((VALUE));
+extern INLINE VALUE rb_class_of _((VALUE));
+extern INLINE int rb_type _((VALUE));
+extern INLINE int rb_special_const_p _((VALUE));
-extern __inline__ VALUE
+#if defined(HAVE_INLINE) || defined(RUBY_NO_INLINE)
+#ifndef RUBY_NO_INLINE
+extern
+#endif
+INLINE VALUE
rb_class_of(VALUE obj)
{
if (FIXNUM_P(obj)) return rb_cFixnum;
@@ -558,7 +561,10 @@ rb_class_of(VALUE obj)
return RBASIC(obj)->klass;
}
-extern __inline__ int
+#ifndef RUBY_NO_INLINE
+extern
+#endif
+INLINE int
rb_type(VALUE obj)
{
if (FIXNUM_P(obj)) return T_FIXNUM;
@@ -570,17 +576,15 @@ rb_type(VALUE obj)
return BUILTIN_TYPE(obj);
}
-extern __inline__ int
+#ifndef RUBY_NO_INLINE
+extern
+#endif
+INLINE int
rb_special_const_p(VALUE obj)
{
if (SPECIAL_CONST_P(obj)) return Qtrue;
return Qfalse;
}
-
-#else
-VALUE rb_class_of _((VALUE));
-int rb_type _((VALUE));
-int rb_special_const_p _((VALUE));
#endif
#include "intern.h"