diff options
Diffstat (limited to 'Include/cpython/code.h')
-rw-r--r-- | Include/cpython/code.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h index f3e0761..ab827c5 100644 --- a/Include/cpython/code.h +++ b/Include/cpython/code.h @@ -23,6 +23,9 @@ typedef uint16_t _Py_CODEUNIT; # define _Py_MAKECODEUNIT(opcode, oparg) ((opcode)|((oparg)<<8)) #endif +// Use "unsigned char" instead of "uint8_t" here to avoid illegal aliasing: +#define _Py_SET_OPCODE(word, opcode) (((unsigned char *)&(word))[0] = (opcode)) + /* Bytecode object */ struct PyCodeObject { |