diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-06 05:48:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-09-06 05:48:34 +0000 |
commit | 38d0cbce65d97a8ddc61609d2a052cd91d4a2789 (patch) | |
tree | f57326cf99db9479c3c033f2dfee9e9385d2b2ed /include/ruby/ruby.h | |
parent | d80f56cba3eb0b920e02912243e4dc5ee965914e (diff) | |
download | ruby-38d0cbce65d97a8ddc61609d2a052cd91d4a2789.tar.gz |
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
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 6 |
1 files changed, 1 insertions, 5 deletions
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) : \ |