summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2023-06-02 14:10:45 (GMT)
committerGitHub <noreply@github.com>2023-06-02 14:10:45 (GMT)
commit44bb03f856c30f709bb983f9830eafe914a742aa (patch)
tree59221bf329af04954f5a7669a87c8c82a9add670 /Include
parent41de54378d54f7ffc38f07db4219e80f48c4249e (diff)
downloadcpython-44bb03f856c30f709bb983f9830eafe914a742aa.zip
cpython-44bb03f856c30f709bb983f9830eafe914a742aa.tar.gz
cpython-44bb03f856c30f709bb983f9830eafe914a742aa.tar.bz2
gh-105214: Use named constants for MAKE_FUNCTION oparg (#105215)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_opcode_utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/internal/pycore_opcode_utils.h b/Include/internal/pycore_opcode_utils.h
index 1d5ff98..9dfe775 100644
--- a/Include/internal/pycore_opcode_utils.h
+++ b/Include/internal/pycore_opcode_utils.h
@@ -85,6 +85,12 @@ is_bit_set_in_table(const uint32_t *table, int bitindex) {
#undef LOG_BITS_PER_INT
#undef MASK_LOW_LOG_BITS
+/* Flags used in the oparg for MAKE_FUNCTION */
+#define MAKE_FUNCTION_DEFAULTS 0x01
+#define MAKE_FUNCTION_KWDEFAULTS 0x02
+#define MAKE_FUNCTION_ANNOTATIONS 0x04
+#define MAKE_FUNCTION_CLOSURE 0x08
+
#ifdef __cplusplus
}