diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-11 20:35:10 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-11 20:35:10 +0000 |
commit | 2e4f2aaaf0e9e245db7f5d2596b4aef4ec0406f8 (patch) | |
tree | c575bf4d1763517b0af37177da1aa9bc04e1a835 /include/ruby | |
parent | 302c311199c80ac9094dfa2b9781e6240f6a3092 (diff) | |
download | ruby-2e4f2aaaf0e9e245db7f5d2596b4aef4ec0406f8.tar.gz |
* include/ruby/ruby.h (FIX2ULONG): drop sign bit for LLP64 platform.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/ruby.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 059c145265..0df42e7314 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -201,7 +201,7 @@ VALUE rb_ull2inum(unsigned LONG_LONG); #endif #define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1) -#define FIX2ULONG(x) (((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 NEGFIXABLE(f) ((f) >= FIXNUM_MIN) |