From 4c307bfba1e5ffa3cec94bd63ba19ba6c322883b Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 1 Apr 2017 11:39:38 +1100 Subject: 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. --- py/mpconfig.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'py') 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 -- cgit v1.2.3