diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-22 08:59:26 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-22 08:59:26 +0000 |
commit | af139b7b41b4f550080089b5bae2dd5d818fe511 (patch) | |
tree | 6e2b7d9acc5a7948ab6487e3084997246376b5b3 /ruby.h | |
parent | adb111e23562ec48c8a2fdf7429c759b9600019c (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/branches/ruby_1_6@1275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r-- | ruby.h | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -546,11 +546,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; @@ -561,11 +560,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; @@ -576,15 +573,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" |