summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-26 08:56:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-03-26 08:56:08 +0000
commita4918f7cc5205671e60082f949aaf3a0fcafd733 (patch)
tree8f79f4a9565b3e67c774304fc25d82dbd6cbb107 /ruby.h
parent784626121b7afc215675097e8db3f46302fca6d4 (diff)
* eval.c: remove TMP_PROTECT_END to prevent C_ALLOCA crash.
* eval.c (ev_const_defined): should ignore toplevel cbase (Object). * eval.c (ev_const_get): ditto. * ext/curses/curses.c: curses on Mac OS X public beta does not have _maxx etc. * marshal.c (w_object): should truncate trailing zero short for bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h34
1 files changed, 27 insertions, 7 deletions
diff --git a/ruby.h b/ruby.h
index 48e2258588..80ae6b3e2a 100644
--- a/ruby.h
+++ b/ruby.h
@@ -542,14 +542,24 @@ EXTERN VALUE rb_eNameError;
EXTERN VALUE rb_eSyntaxError;
EXTERN VALUE rb_eLoadError;
-extern inline VALUE rb_class_of _((VALUE));
-extern inline int rb_type _((VALUE));
-extern inline int rb_special_const_p _((VALUE));
+#ifdef INLINE_DEFINE
+#define INLINE
+#else
+#define INLINE inline
+#endif
+
+extern INLINE VALUE rb_class_of _((VALUE));
+extern INLINE int rb_type _((VALUE));
+extern INLINE int rb_special_const_p _((VALUE));
#if !defined(NO_C_INLINE) || defined(INLINE_DEFINE)
-extern inline VALUE
+extern INLINE VALUE
+#if defined(__cplusplus)
+rb_class_of(VALUE obj)
+#else
rb_class_of(obj)
VALUE obj;
+#endif
{
if (FIXNUM_P(obj)) return rb_cFixnum;
if (obj == Qnil) return rb_cNilClass;
@@ -560,9 +570,13 @@ rb_class_of(obj)
return RBASIC(obj)->klass;
}
-extern inline int
+extern INLINE int
+#if defined(__cplusplus)
+rb_type(VALUE obj)
+#else
rb_type(obj)
- VALUE obj;
+ VALUE obj;
+#endif
{
if (FIXNUM_P(obj)) return T_FIXNUM;
if (obj == Qnil) return T_NIL;
@@ -573,15 +587,21 @@ rb_type(obj)
return BUILTIN_TYPE(obj);
}
-extern inline int
+extern INLINE int
+#if defined(__cplusplus)
+rb_special_const_p(VALUE obj)
+#else
rb_special_const_p(obj)
VALUE obj;
+#endif
{
if (SPECIAL_CONST_P(obj)) return Qtrue;
return Qfalse;
}
#endif
+#undef INLINE
+
#include "intern.h"
#if defined(EXTLIB) && defined(USE_DLN_A_OUT)