From a08df05021a3513d0382b95197e020e44da45a4d Mon Sep 17 00:00:00 2001 From: shyouhei Date: Thu, 9 Mar 2017 02:31:23 +0000 Subject: 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 --- include/ruby/ruby.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'include') 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); -- cgit v1.2.3