diff options
author | Damien George <damien.p.george@gmail.com> | 2017-04-01 11:39:38 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-04-01 11:39:38 +1100 |
commit | 4c307bfba1e5ffa3cec94bd63ba19ba6c322883b (patch) | |
tree | 0ca562a561a639e2ab83e94d07f79699870c6986 /py | |
parent | 64d00511e11eed6e37134e5b43acac8a33226ca0 (diff) |
all: Move BYTES_PER_WORD definition from ports to py/mpconfig.h
It can still be overwritten by a port in mpconfigport.h but for almost
all cases one can use the provided default.
Diffstat (limited to 'py')
-rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 54cf0f3d3..9c89fc18a 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1105,6 +1105,11 @@ typedef double mp_float_t; #define STATIC static #endif +// Number of bytes in a word +#ifndef BYTES_PER_WORD +#define BYTES_PER_WORD (sizeof(mp_uint_t)) +#endif + #define BITS_PER_BYTE (8) #define BITS_PER_WORD (BITS_PER_BYTE * BYTES_PER_WORD) // mp_int_t value with most significant bit set |