mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
* include/ruby/ruby.h (POSFIXABLE): use FIXNUM_MAX+1 instead of
FIXNUM_MAX to make it possible to convert to double accurately. It assumes FLT_RADIX is 2. fix RubyForge bug #14102. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6837681a4c
commit
6daf556345
3 changed files with 42 additions and 1 deletions
|
@ -193,7 +193,7 @@ VALUE rb_ull2inum(unsigned LONG_LONG);
|
|||
#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1)
|
||||
#define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX)
|
||||
#define FIXNUM_P(f) (((SIGNED_VALUE)(f))&FIXNUM_FLAG)
|
||||
#define POSFIXABLE(f) ((f) <= FIXNUM_MAX)
|
||||
#define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)
|
||||
#define NEGFIXABLE(f) ((f) >= FIXNUM_MIN)
|
||||
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue