diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-06-15 08:55:48 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:11 +0900 |
| commit | ee111dd175f3242649d87a4600e2bad62e8e0940 (patch) | |
| tree | cabfe4a193075d9110ea3608e8dc4c3bb835e280 /src/load.c | |
| parent | f0c11269977e83f2e578a32134d4b65a2cf72ec0 (diff) | |
| download | mruby-ee111dd175f3242649d87a4600e2bad62e8e0940.tar.gz mruby-ee111dd175f3242649d87a4600e2bad62e8e0940.zip | |
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
Diffstat (limited to 'src/load.c')
| -rw-r--r-- | src/load.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 |
