py: Remove BITS_PER_WORD definition.

It's only used in one location, to test if << or >> will overflow when
shifting mp_uint_t.  For such a test it's clearer to use sizeof(lhs_val),
which will be valid even if the type of lhs_val changes.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2021-02-04 15:27:53 +11:00
parent 7c44354592
commit 8a41ee19c2
2 changed files with 5 additions and 4 deletions

View File

@@ -1538,7 +1538,6 @@ typedef double mp_float_t;
#ifndef BITS_PER_BYTE
#define BITS_PER_BYTE (8)
#endif
#define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD)
// mp_int_t value with most significant bit set
#define WORD_MSBIT_HIGH (((mp_uint_t)1) << (BYTES_PER_WORD * 8 - 1))