diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-15 13:47:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-15 13:47:38 +0000 |
commit | 8a4966d133452682086270b719e93fadf69cd266 (patch) | |
tree | f775ed7e46223a523dac6abddd699f9007e1f63b /include/ruby/ruby.h | |
parent | a45936d454104b1d1e7ea663f1580339ce1f1071 (diff) | |
download | ruby-8a4966d133452682086270b719e93fadf69cd266.tar.gz |
* include/ruby/ruby.h (VALUE): prefer long over uintptr_t,
FIX2LONG expects VALUE to be long at least.
* include/ruby/ruby.h (FIX2LONG): parenthesize the argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 5d550b5f3c..019285b2c1 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -83,7 +83,7 @@ extern "C" { # endif #endif -#if defined HAVE_UINTPTR_T +#if defined HAVE_UINTPTR_T && 0 typedef uintptr_t VALUE; typedef uintptr_t ID; # define SIGNED_VALUE intptr_t @@ -313,7 +313,7 @@ rb_long2int(long n) {rb_long2int_internal(n, i); return i;} #define NUM2GIDT(v) NUM2LONG(v) #endif -#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1) +#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+1) |