diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-12 15:54:53 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-12 15:54:53 +0000 |
commit | d50b2d8d49f4ebaa837d8948b202a464072c21de (patch) | |
tree | 5b72e65de7d3e5b62e56945b9bb558cbd3613a2b | |
parent | 04b473c5cdd4a81f75bedee0553beabc4358e716 (diff) | |
download | ruby-d50b2d8d49f4ebaa837d8948b202a464072c21de.tar.gz |
* ruby.h (FIX2LONG): returns integer of size of VALUE.
[ruby-dev:29024]
* ruby.h (FIX2ULONG): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ruby.h | 6 |
2 files changed, 10 insertions, 3 deletions
@@ -1,3 +1,10 @@ +Thu Jul 13 00:40:57 2006 Yukihiro Matsumoto <matz@ruby-lang.org> + + * ruby.h (FIX2LONG): returns integer of size of VALUE. + [ruby-dev:29024] + + * ruby.h (FIX2ULONG): ditto. + Wed Jul 12 20:05:23 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * parse.y (f_args): allow post mandatory arguments after optional @@ -185,9 +185,9 @@ VALUE rb_ull2inum(unsigned LONG_LONG); # define OFFT2NUM(v) INT2NUM(v) #endif -#define FIX2LONG(x) RSHIFT((long)x,1) -#define FIX2ULONG(x) (((unsigned long)(x))>>1) -#define FIXNUM_P(f) (((long)(f))&FIXNUM_FLAG) +#define FIX2LONG(x) RSHIFT((SIGNED_VALUE)x,1) +#define FIX2ULONG(x) (((VALUE)(x))>>1) +#define FIXNUM_P(f) (((SIGNED_VALUE)(f))&FIXNUM_FLAG) #define POSFIXABLE(f) ((f) <= FIXNUM_MAX) #define NEGFIXABLE(f) ((f) >= FIXNUM_MIN) #define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f)) |