Skip to content

Commit cc83737

Browse files
committed
Don't allow both ENDIANNESSes to be set
See discussion on micropython@2da81fa Explicitly set `MP_ENDIANNESS_LITTLE` because that's the #define that is used in code elsewhere.
1 parent bbae42d commit cc83737

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

py/mpconfig.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ typedef double mp_float_t;
187187
// Just because most archs are such?
188188
#define MP_ENDIANNESS_LITTLE (1)
189189
#endif
190+
// Ensure we don't accidentally set both endiannesses
191+
#if MP_ENDIANNESS_BIG
192+
#define MP_ENDIANNESS_LITTLE (0)
193+
#endif
190194

191195
// printf format spec to use for machine_int_t and friends
192196
#ifndef INT_FMT

0 commit comments

Comments
 (0)