Skip to content

Commit 52017db

Browse files
authored
gh-100747: some compiler macros use c instead of C to access the compiler (#100748)
1 parent 15aecf8 commit 52017db

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Python/compile.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@
131131
(opcode) == STORE_FAST__LOAD_FAST || \
132132
(opcode) == STORE_FAST__STORE_FAST)
133133

134-
#define IS_TOP_LEVEL_AWAIT(c) ( \
135-
(c->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
136-
&& (c->u->u_ste->ste_type == ModuleBlock))
134+
#define IS_TOP_LEVEL_AWAIT(C) ( \
135+
((C)->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
136+
&& ((C)->u->u_ste->ste_type == ModuleBlock))
137137

138138
typedef _PyCompilerSrcLocation location;
139139

@@ -479,7 +479,7 @@ struct compiler {
479479
PyArena *c_arena; /* pointer to memory allocation arena */
480480
};
481481

482-
#define CFG_BUILDER(c) (&((c)->u->u_cfg_builder))
482+
#define CFG_BUILDER(C) (&((C)->u->u_cfg_builder))
483483

484484

485485
typedef struct {
@@ -1626,7 +1626,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
16261626

16271627
#define ADDOP_IN_SCOPE(C, LOC, OP) { \
16281628
if (cfg_builder_addop_noarg(CFG_BUILDER(C), (OP), (LOC)) < 0) { \
1629-
compiler_exit_scope(c); \
1629+
compiler_exit_scope(C); \
16301630
return -1; \
16311631
} \
16321632
}
@@ -1692,7 +1692,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
16921692

16931693
#define VISIT_IN_SCOPE(C, TYPE, V) {\
16941694
if (compiler_visit_ ## TYPE((C), (V)) < 0) { \
1695-
compiler_exit_scope(c); \
1695+
compiler_exit_scope(C); \
16961696
return ERROR; \
16971697
} \
16981698
}
@@ -1713,7 +1713,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
17131713
for (_i = 0; _i < asdl_seq_LEN(seq); _i++) { \
17141714
TYPE ## _ty elt = (TYPE ## _ty)asdl_seq_GET(seq, _i); \
17151715
if (compiler_visit_ ## TYPE((C), elt) < 0) { \
1716-
compiler_exit_scope(c); \
1716+
compiler_exit_scope(C); \
17171717
return ERROR; \
17181718
} \
17191719
} \

0 commit comments

Comments
 (0)