summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/code.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/code.h b/Include/code.h
index 9823f10..0619029 100644
--- a/Include/code.h
+++ b/Include/code.h
@@ -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