summaryrefslogtreecommitdiff
path: root/py/mpz.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-02-04 16:39:46 +1100
committerDamien George <damien@micropython.org>2021-02-04 22:46:42 +1100
commitc891190c693ec04289f5773b2b27d125f8c6059f (patch)
treeac74af14e2437316f2eae03478955030c27b2924 /py/mpz.c
parentad4656b861f94277bed9647ca176e662ce5119e3 (diff)
py: Rename WORD_MSBIT_HIGH to MP_OBJ_WORD_MSBIT_HIGH.
To make it clear it is for mp_obj_t/mp_uint_t "word" types, and to prefix this macro with MP_. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/mpz.c')
-rw-r--r--py/mpz.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/mpz.c b/py/mpz.c
index 751593053..51d0c9689 100644
--- a/py/mpz.c
+++ b/py/mpz.c
@@ -1573,7 +1573,7 @@ bool mpz_as_int_checked(const mpz_t *i, mp_int_t *value) {
mpz_dig_t *d = i->dig + i->len;
while (d-- > i->dig) {
- if (val > (~(WORD_MSBIT_HIGH) >> DIG_SIZE)) {
+ if (val > (~(MP_OBJ_WORD_MSBIT_HIGH) >> DIG_SIZE)) {
// will overflow
return false;
}
@@ -1598,7 +1598,7 @@ bool mpz_as_uint_checked(const mpz_t *i, mp_uint_t *value) {
mpz_dig_t *d = i->dig + i->len;
while (d-- > i->dig) {
- if (val > (~(WORD_MSBIT_HIGH) >> (DIG_SIZE - 1))) {
+ if (val > (~(MP_OBJ_WORD_MSBIT_HIGH) >> (DIG_SIZE - 1))) {
// will overflow
return false;
}