Skip to content

Commit 42c00bc

Browse files
committed
pythongh-107082: Fix _Py_CODEUNIT struct for big endian
1 parent 2e07449 commit 42c00bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Include/cpython/code.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,13 @@ typedef struct _Py_Monitors {
3131
typedef union {
3232
uint16_t cache;
3333
struct {
34+
#if PY_LITTLE_ENDIAN == 1
3435
uint8_t code;
3536
uint8_t arg;
37+
#else
38+
uint8_t arg;
39+
uint8_t code;
40+
#endif
3641
} op;
3742
} _Py_CODEUNIT;
3843

0 commit comments

Comments
 (0)