Issue #27129: Replaced wordcode related magic constants with macros.

This commit is contained in:
Serhiy Storchaka 2016-09-11 13:48:15 +03:00
parent bdb847ae99
commit ab8740058a
7 changed files with 173 additions and 158 deletions

View file

@ -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