summaryrefslogtreecommitdiffstats
path: root/Include/opcode.h
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2021-09-14 08:53:32 (GMT)
committerGitHub <noreply@github.com>2021-09-14 08:53:32 (GMT)
commitc2f1e953371c25f6c42b599ba3d8797effbb503e (patch)
tree96c6c27edc2fbd765014187431df79acbf26c271 /Include/opcode.h
parent9f93018b69d72cb48d3444554261ae3b0ea00c93 (diff)
downloadcpython-c2f1e953371c25f6c42b599ba3d8797effbb503e.zip
cpython-c2f1e953371c25f6c42b599ba3d8797effbb503e.tar.gz
cpython-c2f1e953371c25f6c42b599ba3d8797effbb503e.tar.bz2
bpo-45152: Add HAS_CONST macro and get_const_value() function and useā€¦ (#28262)
Diffstat (limited to 'Include/opcode.h')
-rw-r--r--Include/opcode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/opcode.h b/Include/opcode.h
index 0043cc2..2789525 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -190,6 +190,10 @@ static uint32_t _PyOpcode_Jump[8] = {
};
#endif /* OPCODE_TABLES */
+#define HAS_CONST(op) (false\
+ || ((op) == 100) \
+ )
+
#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
/* Reserve some bytecodes for internal use in the compiler.