summaryrefslogtreecommitdiffstats
path: root/Python/ceval_macros.h
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-06-13 20:42:03 (GMT)
committerGitHub <noreply@github.com>2023-06-13 20:42:03 (GMT)
commitbe2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7 (patch)
tree4789368f885f8e144876dd680987c532eafa66cf /Python/ceval_macros.h
parent2211454fe210637ed7fabda12690dac6cc9a8149 (diff)
downloadcpython-be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7.zip
cpython-be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7.tar.gz
cpython-be2779c0cb54e56ea4bb9822cc7bb5c24e6a7af7.tar.bz2
gh-105481: add flags to each instr in the opcode metadata table, to replace opcode.hasarg/hasname/hasconst (#105482)
Diffstat (limited to 'Python/ceval_macros.h')
-rw-r--r--Python/ceval_macros.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h
index 44d6ee8..6f6fabc 100644
--- a/Python/ceval_macros.h
+++ b/Python/ceval_macros.h
@@ -219,6 +219,11 @@ GETITEM(PyObject *v, Py_ssize_t i) {
#define STACK_SHRINK(n) BASIC_STACKADJ(-(n))
#endif
+
+/* Data access macros */
+#define FRAME_CO_CONSTS (frame->f_code->co_consts)
+#define FRAME_CO_NAMES (frame->f_code->co_names)
+
/* Local variable macros */
#define GETLOCAL(i) (frame->localsplus[i])