summaryrefslogtreecommitdiffstats
path: root/include/ruby/ruby.h
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
commit1949b29b436becd04c828d4c1b50f5c9b2127da9 (patch)
treec575bf4d1763517b0af37177da1aa9bc04e1a835 /include/ruby/ruby.h
parent30717936b6d8e6761ff131453b2fecc377bf8e4e (diff)
downloadruby-1949b29b436becd04c828d4c1b50f5c9b2127da9.tar.gz
ruby-1949b29b436becd04c828d4c1b50f5c9b2127da9.tar.xz
ruby-1949b29b436becd04c828d4c1b50f5c9b2127da9.zip
* include/ruby/ruby.h (FIX2ULONG): drop sign bit for LLP64 platform.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-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 059c14526..0df42e731 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)