summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-22 08:59:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-22 08:59:26 +0000
commit285cb99ba493a113098b78c9989cba5a870f2435 (patch)
tree8b65e3a45b97bc24a60d4e9cf41f74c0dd25f600 /ruby.h
parent22198c30b115dd69227dfa3a006c323576067fe8 (diff)
* ruby.h: better inline function support.
* configure.in (NO_C_INLINE): check if inline is available for the C compiler. * marshal.c (r_object): len calculation patch was wrong for machines SIZEOF_BDIGITS == SIZEOF_SHORT. * gc.c: alloca prototype reorganized for C_ALLOCA machine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/ruby.h b/ruby.h
index a9f9c11..d7da398 100644
--- a/ruby.h
+++ b/ruby.h
@@ -545,11 +545,10 @@ extern inline VALUE rb_class_of _((VALUE));
extern inline int rb_type _((VALUE));
extern inline int rb_special_const_p _((VALUE));
-#ifndef RUBY_NO_INLINE
-extern inline
-#endif
-VALUE
-rb_class_of(VALUE obj)
+#if !defined(NO_C_INLINE) || defined(INLINE_DEFINE)
+extern inline VALUE
+rb_class_of(obj)
+ VALUE obj;
{
if (FIXNUM_P(obj)) return rb_cFixnum;
if (obj == Qnil) return rb_cNilClass;
@@ -560,11 +559,9 @@ rb_class_of(VALUE obj)
return RBASIC(obj)->klass;
}
-#ifndef RUBY_NO_INLINE
-extern inline
-#endif
-int
-rb_type(VALUE obj)
+extern inline int
+rb_type(obj)
+ VALUE obj;
{
if (FIXNUM_P(obj)) return T_FIXNUM;
if (obj == Qnil) return T_NIL;
@@ -575,15 +572,14 @@ rb_type(VALUE obj)
return BUILTIN_TYPE(obj);
}
-#ifndef RUBY_NO_INLINE
-extern inline
-#endif
-int
-rb_special_const_p(VALUE obj)
+extern inline int
+rb_special_const_p(obj)
+ VALUE obj;
{
if (SPECIAL_CONST_P(obj)) return Qtrue;
return Qfalse;
}
+#endif
#include "intern.h"