diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-09 02:31:23 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-03-09 02:31:23 +0000 |
commit | c56edb9a59488f5efb6b6cbe02ac9db10bc0e6d3 (patch) | |
tree | 13bb3e499ace099af85fe5679e763f5fba3a16de /include/ruby | |
parent | 35fde4da0bef35b1f0e240549ed3307a3f0c0fca (diff) | |
download | ruby-c56edb9a59488f5efb6b6cbe02ac9db10bc0e6d3.tar.gz |
revert RB_FIXABLE related changesets [Bug #13288][Bug #13293][Bug #13294]
This commit is auto-generated using following command:
svn diff -r57807:57788 include internal.h bignum.c numeric.c compile.c insns.def object.c sprintf.c | patch -p0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/ruby.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index f99264f105..d770c30735 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1504,17 +1504,6 @@ rb_integer_type_p(VALUE obj) } #endif -static inline int -rb_long_is_fixable_p(long v) -{ -#ifdef HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW - SIGNED_VALUE w; - return! __builtin_add_overflow(v, v, &w); -#else - return RB_FIXABLE(v); -#endif -} - #if SIZEOF_INT < SIZEOF_LONG # define RB_INT2NUM(v) RB_INT2FIX((int)(v)) # define RB_UINT2NUM(v) RB_LONG2FIX((unsigned int)(v)) @@ -1522,7 +1511,7 @@ rb_long_is_fixable_p(long v) static inline VALUE rb_int2num_inline(int v) { - if (rb_long_is_fixable_p(v)) + if (RB_FIXABLE(v)) return RB_INT2FIX(v); else return rb_int2big(v); @@ -1545,7 +1534,7 @@ rb_uint2num_inline(unsigned int v) static inline VALUE rb_long2num_inline(long v) { - if (rb_long_is_fixable_p(v)) + if (RB_FIXABLE(v)) return RB_LONG2FIX(v); else return rb_int2big(v); |