From 38d0cbce65d97a8ddc61609d2a052cd91d4a2789 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 6 Sep 2012 05:48:34 +0000 Subject: ruby.h: merge FLONUM and non-FLONUM * include/ruby/ruby.h (RB_FLOAT_TYPE_P): merge FLONUM and non-FLONUM versions. inline TYPE() comparison and FLONUM_P() should be optimized away on non-FLONUM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index a674de8dc6..61a5a50eeb 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1497,11 +1497,7 @@ rb_type(VALUE obj) return BUILTIN_TYPE(obj); } -#if USE_FLONUM -#define RB_FLOAT_TYPE_P(obj) (FLONUM_P(obj) || TYPE(obj) == T_FLOAT) -#else -#define RB_FLOAT_TYPE_P(obj) (!SPECIAL_CONST_P(obj) && BUILTIN_TYPE(obj) == T_FLOAT) -#endif +#define RB_FLOAT_TYPE_P(obj) (FLONUM_P(obj) || (!SPECIAL_CONST_P(obj) && BUILTIN_TYPE(obj) == T_FLOAT)) #define RB_TYPE_P(obj, type) ( \ ((type) == T_FIXNUM) ? FIXNUM_P(obj) : \ -- cgit v1.2.3