diff options
Diffstat (limited to 'py/binary.c')
-rw-r--r-- | py/binary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/binary.c b/py/binary.c index 1847894b7..5c098b223 100644 --- a/py/binary.c +++ b/py/binary.c @@ -321,7 +321,7 @@ void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte *p double f; } fp_dp; fp_dp.f = mp_obj_get_float_to_d(val_in); - if (BYTES_PER_WORD == 8) { + if (MP_BYTES_PER_OBJ_WORD == 8) { val = fp_dp.i64; } else { int be = struct_type == '>'; @@ -342,7 +342,7 @@ void mp_binary_set_val(char struct_type, char val_type, mp_obj_t val_in, byte *p val = mp_obj_get_int(val_in); // zero/sign extend if needed - if (BYTES_PER_WORD < 8 && size > sizeof(val)) { + if (MP_BYTES_PER_OBJ_WORD < 8 && size > sizeof(val)) { int c = (mp_int_t)val < 0 ? 0xff : 0x00; memset(p, c, size); if (struct_type == '>') { |