diff --git a/Include/cpython/code.h b/Include/cpython/code.h index b8953e26ecddcb..7f4c5ec69c3e0d 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -31,8 +31,13 @@ typedef struct _Py_Monitors { typedef union { uint16_t cache; struct { +#if PY_LITTLE_ENDIAN == 1 uint8_t code; uint8_t arg; +#else + uint8_t arg; + uint8_t code; +#endif } op; } _Py_CODEUNIT;