Commit db3d72a4 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

move RSHIFT from numeric.h to numeric.c

parent 6a5019d3
......@@ -13,7 +13,6 @@ extern "C" {
#include <limits.h>
#define RSHIFT(x,y) ((x)>>(int)(y))
#define POSFIXABLE(f) ((f) <= INT_MAX)
#define NEGFIXABLE(f) ((f) >= INT_MIN)
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment