mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Always use old RB_FIXABLE to allow double as argument
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
110760fa5d
commit
63c7ccc64b
1 changed files with 1 additions and 5 deletions
|
@ -359,11 +359,7 @@ rb_fix2ulong(VALUE x)
|
|||
#define RB_FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&RUBY_FIXNUM_FLAG)
|
||||
#define RB_POSFIXABLE(f) ((f) < RUBY_FIXNUM_MAX+1)
|
||||
#define RB_NEGFIXABLE(f) ((f) >= RUBY_FIXNUM_MIN)
|
||||
#if defined HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW
|
||||
# define RB_FIXABLE(f) ({SIGNED_VALUE a=(f),c; !__builtin_add_overflow(a, a, &c);})
|
||||
#else
|
||||
#define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f))
|
||||
#endif
|
||||
#define FIX2LONG(x) RB_FIX2LONG(x)
|
||||
#define FIX2ULONG(x) RB_FIX2ULONG(x)
|
||||
#define FIXNUM_P(f) RB_FIXNUM_P(f)
|
||||
|
|
Loading…
Add table
Reference in a new issue