summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-11 20:35:10 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-11 20:35:10 +0000
commit2e4f2aaaf0e9e245db7f5d2596b4aef4ec0406f8 (patch)
treec575bf4d1763517b0af37177da1aa9bc04e1a835 /include
parent302c311199c80ac9094dfa2b9781e6240f6a3092 (diff)
* 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')
-rw-r--r--include/ruby/ruby.h2
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)