diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-31 16:14:15 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-31 16:14:15 +0000 |
commit | a7526797a65a2f51bc93561c9545fddcd3c3e012 (patch) | |
tree | c25677641e922369956efed52af691bb053904a1 /include/ruby/ruby.h | |
parent | c68234f7d1fa9f2e9a1874b547f1f3e48eff5ae1 (diff) | |
download | ruby-a7526797a65a2f51bc93561c9545fddcd3c3e012.tar.gz |
* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.
* test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r-- | include/ruby/ruby.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index eba50ea114..d6a0a924d2 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -337,7 +337,7 @@ rb_long2int_inline(long n) #endif #define FIX2LONG(x) (long)RSHIFT((SIGNED_VALUE)(x),1) -#define FIX2ULONG(x) ((((VALUE)(x))>>1)&LONG_MAX) +#define FIX2ULONG(x) ((unsigned long)FIX2LONG(x)) #define FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&FIXNUM_FLAG) #define POSFIXABLE(f) ((f) < FIXNUM_MAX+1) #define NEGFIXABLE(f) ((f) >= FIXNUM_MIN) |