Allow `int` size combinations for `MRB_WORD_BOXING`.
`MRB_64BIT` and `MRB_INT32`
`MRB_32BIT` and `MRB_INT64`
MODIFY
include/mruby/boxing_word.h
include/mruby/boxing_word.h
#ifndef MRUBY_BOXING_WORD_H
#define MRUBY_BOXING_WORD_H
-#if defined(MRB_INT64) && !defined(MRB_64BIT)
-#error MRB_INT64 cannot be used with MRB_WORD_BOXING in 32-bit mode.
-#endif
-
#ifndef MRB_NO_FLOAT
struct RFloat {
MRB_OBJECT_HEADER;

MODIFY
include/mruby/irep.h
include/mruby/irep.h
@@ -31,7 +31,7 @@ typedef struct mrb_pool_value {
union {
const char *str;
int32_t i32;
-#ifdef MRB_64BIT
+#if defined(MRB_64BIT) || defined(MRB_INT64)
int64_t i64;
#endif
mrb_float f;

MODIFY
include/mruby/value.h
include/mruby/value.h
@@ -56,8 +56,6 @@ struct mrb_state;
# define MRB_INT_BIT 64
# define MRB_INT_MIN INT64_MIN
# define MRB_INT_MAX INT64_MAX
-# define MRB_FIXNUM_MIN (INT64_MIN>>MRB_FIXNUM_SHIFT)
-# define MRB_FIXNUM_MAX (INT64_MAX>>MRB_FIXNUM_SHIFT)
# define MRB_PRIo PRIo64
# define MRB_PRId PRId64
# define MRB_PRIx PRIx64
@@ -66,13 +64,19 @@ struct mrb_state;
# define MRB_INT_BIT 32
# define MRB_INT_MIN INT32_MIN
# define MRB_INT_MAX INT32_MAX
-# define MRB_FIXNUM_MIN (INT32_MIN>>MRB_FIXNUM_SHIFT)
-# define MRB_FIXNUM_MAX (INT32_MAX>>MRB_FIXNUM_SHIFT)
# define MRB_PRIo PRIo32
# define MRB_PRId PRId32
# define MRB_PRIx PRIx32
#endif
+#if defined(MRB_64BIT) && defined(MRB_INT64)
+# define MRB_FIXNUM_MIN (INT64_MIN>>MRB_FIXNUM_SHIFT)
+# define MRB_FIXNUM_MAX (INT64_MAX>>MRB_FIXNUM_SHIFT)
+#else
+# define MRB_FIXNUM_MIN (INT32_MIN>>MRB_FIXNUM_SHIFT)
+# define MRB_FIXNUM_MAX (INT32_MAX>>MRB_FIXNUM_SHIFT)
+#endif
+
#ifdef MRB_ENDIAN_BIG
# define MRB_ENDIAN_LOHI(a,b) a b
#else

Allow `int` size combinations for `MRB_WORD_BOXING`.

- `MRB_64BIT` and `MRB_INT32`
- `MRB_32BIT` and `MRB_INT64`