py: Rename BITS_PER_BYTE to MP_BITS_PER_BYTE.

To give this macro a standard MP_ prefix.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-02-04 15:32:59 +11:00
parent 8a41ee19c2
commit 7e956fae28
5 changed files with 10 additions and 9 deletions

View File

@@ -77,7 +77,7 @@ mp_int_t mp_float_hash(mp_float_t src) {
// number may have a fraction; xor the integer part with the fractional part
val = (frc >> (MP_FLOAT_FRAC_BITS - adj_exp))
^ (frc & (((mp_float_uint_t)1 << (MP_FLOAT_FRAC_BITS - adj_exp)) - 1));
} else if ((unsigned int)adj_exp < BITS_PER_BYTE * sizeof(mp_int_t) - 1) {
} else if ((unsigned int)adj_exp < MP_BITS_PER_BYTE * sizeof(mp_int_t) - 1) {
// the number is a (big) whole integer and will fit in val's signed-width
val = (mp_int_t)frc << (adj_exp - MP_FLOAT_FRAC_BITS);
} else {