mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
Issue #27129: Replaced wordcode related magic constants with macros.
This commit is contained in:
parent
bdb847ae99
commit
ab8740058a
7 changed files with 173 additions and 158 deletions
|
@ -7,6 +7,16 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint16_t _Py_CODEUNIT;
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define _Py_OPCODE(word) ((word) >> 8)
|
||||
# define _Py_OPARG(word) ((word) & 255)
|
||||
#else
|
||||
# define _Py_OPCODE(word) ((word) & 255)
|
||||
# define _Py_OPARG(word) ((word) >> 8)
|
||||
#endif
|
||||
|
||||
/* Bytecode object */
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue