aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-09 02:31:23 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-09 02:31:23 +0000
commita08df05021a3513d0382b95197e020e44da45a4d (patch)
tree13bb3e499ace099af85fe5679e763f5fba3a16de /include
parented598ead0ed450df9b2ab428f9330e5ea31d2287 (diff)
downloadruby-a08df05021a3513d0382b95197e020e44da45a4d.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')
-rw-r--r--include/ruby/ruby.h15
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);