mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
defining mrb_int also requires MRB_INT_{MAX,MIN} to be defined
This commit is contained in:
@@ -62,8 +62,12 @@ typedef double mrb_float;
|
||||
|
||||
#ifdef MRB_NAN_BOXING
|
||||
typedef int32_t mrb_int;
|
||||
#define MRB_INT_MIN INT32_MIN
|
||||
#define MRB_INT_MAX INT32_MAX
|
||||
#else
|
||||
typedef int mrb_int;
|
||||
#define MRB_INT_MIN INT_MIN
|
||||
#define MRB_INT_MAX INT_MAX
|
||||
#endif
|
||||
typedef short mrb_sym;
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@ extern "C" {
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#define POSFIXABLE(f) ((f) <= INT_MAX)
|
||||
#define NEGFIXABLE(f) ((f) >= INT_MIN)
|
||||
#define POSFIXABLE(f) ((f) <= MRB_INT_MAX)
|
||||
#define NEGFIXABLE(f) ((f) >= MRB_INT_MIN)
|
||||
#define FIXABLE(f) (POSFIXABLE(f) && NEGFIXABLE(f))
|
||||
|
||||
mrb_value mrb_flt2big(mrb_state *mrb, mrb_float d);
|
||||
|
||||
Reference in New Issue
Block a user