diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-06-13 15:40:41 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-06-13 15:40:41 +0900 |
| commit | db3d72a471a0ee4d8d6ea248e99b2b062b390511 (patch) | |
| tree | d132416c7657de9a4a2648412d3aa0acb85a75ce /src | |
| parent | 6a5019d37fd595abd9e8297bb3d35a1ee054becf (diff) | |
| download | mruby-db3d72a471a0ee4d8d6ea248e99b2b062b390511.tar.gz mruby-db3d72a471a0ee4d8d6ea248e99b2b062b390511.zip | |
move RSHIFT from numeric.h to numeric.c
Diffstat (limited to 'src')
| -rw-r--r-- | src/numeric.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/numeric.c b/src/numeric.c index 2d668fa79..e894b3dc3 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -28,7 +28,7 @@ #include <ieeefp.h> #endif -#define SIGNED_VALUE intptr_t +#define RSHIFT(x,y) ((x)>>(int)(y)) #ifdef MRB_USE_FLOAT #define floor(f) floorf(f) @@ -697,7 +697,7 @@ int_succ(mrb_state *mrb, mrb_value num) return mrb_funcall(mrb, num, "+", 1, mrb_fixnum_value(1)); } -#define SQRT_INT_MAX ((SIGNED_VALUE)1<<((sizeof(mrb_int)*CHAR_BIT-1)/2)) +#define SQRT_INT_MAX ((mrb_int)1<<((sizeof(mrb_int)*CHAR_BIT-1)/2)) /*tests if N*N would overflow*/ #define FIT_SQRT_INT(n) (((n)<SQRT_INT_MAX)&&((n)>=-SQRT_INT_MAX)) |
