From ee111dd175f3242649d87a4600e2bad62e8e0940 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 15 Jun 2020 08:55:48 +0900 Subject: Clarify the use of `MRB_64BIT` and `MRB_INT64` in `dump.c` and `load.c`. - `MRB_64BIT`: the size of a pointer is 64 bits - `MRB_INT64`: the size of `mrb_int` is 64 bits --- src/load.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/load.c') diff --git a/src/load.c b/src/load.c index 31059e833..766aa0648 100644 --- a/src/load.c +++ b/src/load.c @@ -137,7 +137,7 @@ read_irep_record_1(mrb_state *mrb, const uint8_t *bin, size_t *len, uint8_t flag { mrb_int v = (int32_t)bin_to_uint32(src); src += sizeof(uint32_t); -#ifdef MRB_INT64 +#ifdef MRB_64BIT pool[i].tt = IREP_TT_INT64; pool[i].u.i64 = (int64_t)v; #else @@ -147,7 +147,7 @@ read_irep_record_1(mrb_state *mrb, const uint8_t *bin, size_t *len, uint8_t flag } break; case IREP_TT_INT64: -#ifdef MRB_INT64 +#ifdef MRB_64BIT { uint64_t i = bin_to_uint32(src); src += sizeof(uint32_t); @@ -156,10 +156,10 @@ read_irep_record_1(mrb_state *mrb, const uint8_t *bin, size_t *len, uint8_t flag src += sizeof(uint32_t); pool[i].u.i64 = (int64_t)i; } + break; #else - return NULL; /* INT64 not supported on MRB_INT32 */ + return NULL; /* INT64 not supported on MRB_32BIT */ #endif - break; case IREP_TT_FLOAT: #ifndef MRB_WITHOUT_FLOAT -- cgit v1.2.3