summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-01-04 20:19:20 (GMT)
committerGitHub <noreply@github.com>2023-01-04 20:19:20 (GMT)
commit52017dbe1681a7cd4fe0e8d6fbbf81fd711a0506 (patch)
tree39a1b5482f5cbcd4acd34a935977d61b232ca49c /Python
parent15aecf8dd70f82eb507d74fae9662072a377bdc8 (diff)
downloadcpython-52017dbe1681a7cd4fe0e8d6fbbf81fd711a0506.zip
cpython-52017dbe1681a7cd4fe0e8d6fbbf81fd711a0506.tar.gz
cpython-52017dbe1681a7cd4fe0e8d6fbbf81fd711a0506.tar.bz2
gh-100747: some compiler macros use c instead of C to access the compiler (#100748)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/compile.c b/Python/compile.c
index c2e77fe..2527023 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -131,9 +131,9 @@
(opcode) == STORE_FAST__LOAD_FAST || \
(opcode) == STORE_FAST__STORE_FAST)
-#define IS_TOP_LEVEL_AWAIT(c) ( \
- (c->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
- && (c->u->u_ste->ste_type == ModuleBlock))
+#define IS_TOP_LEVEL_AWAIT(C) ( \
+ ((C)->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
+ && ((C)->u->u_ste->ste_type == ModuleBlock))
typedef _PyCompilerSrcLocation location;
@@ -479,7 +479,7 @@ struct compiler {
PyArena *c_arena; /* pointer to memory allocation arena */
};
-#define CFG_BUILDER(c) (&((c)->u->u_cfg_builder))
+#define CFG_BUILDER(C) (&((C)->u->u_cfg_builder))
typedef struct {
@@ -1626,7 +1626,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
#define ADDOP_IN_SCOPE(C, LOC, OP) { \
if (cfg_builder_addop_noarg(CFG_BUILDER(C), (OP), (LOC)) < 0) { \
- compiler_exit_scope(c); \
+ compiler_exit_scope(C); \
return -1; \
} \
}
@@ -1692,7 +1692,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
#define VISIT_IN_SCOPE(C, TYPE, V) {\
if (compiler_visit_ ## TYPE((C), (V)) < 0) { \
- compiler_exit_scope(c); \
+ compiler_exit_scope(C); \
return ERROR; \
} \
}
@@ -1713,7 +1713,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
for (_i = 0; _i < asdl_seq_LEN(seq); _i++) { \
TYPE ## _ty elt = (TYPE ## _ty)asdl_seq_GET(seq, _i); \
if (compiler_visit_ ## TYPE((C), elt) < 0) { \
- compiler_exit_scope(c); \
+ compiler_exit_scope(C); \
return ERROR; \
} \
} \