From 8a4966d133452682086270b719e93fadf69cd266 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 15 Oct 2010 13:47:38 +0000 Subject: * 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 --- include/ruby/ruby.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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) -- cgit v1.2.3