From 2e4f2aaaf0e9e245db7f5d2596b4aef4ec0406f8 Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 11 Jul 2007 20:35:10 +0000 Subject: * 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 --- include/ruby/ruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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) -- cgit v1.2.3