mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-100747: some compiler macros use c instead of C to access the compiler (#100748)
This commit is contained in:
parent
15aecf8dd7
commit
52017dbe16
1 changed files with 7 additions and 7 deletions
|
@ -131,9 +131,9 @@
|
||||||
(opcode) == STORE_FAST__LOAD_FAST || \
|
(opcode) == STORE_FAST__LOAD_FAST || \
|
||||||
(opcode) == STORE_FAST__STORE_FAST)
|
(opcode) == STORE_FAST__STORE_FAST)
|
||||||
|
|
||||||
#define IS_TOP_LEVEL_AWAIT(c) ( \
|
#define IS_TOP_LEVEL_AWAIT(C) ( \
|
||||||
(c->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
|
((C)->c_flags.cf_flags & PyCF_ALLOW_TOP_LEVEL_AWAIT) \
|
||||||
&& (c->u->u_ste->ste_type == ModuleBlock))
|
&& ((C)->u->u_ste->ste_type == ModuleBlock))
|
||||||
|
|
||||||
typedef _PyCompilerSrcLocation location;
|
typedef _PyCompilerSrcLocation location;
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ struct compiler {
|
||||||
PyArena *c_arena; /* pointer to memory allocation arena */
|
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 {
|
typedef struct {
|
||||||
|
@ -1626,7 +1626,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
|
||||||
|
|
||||||
#define ADDOP_IN_SCOPE(C, LOC, OP) { \
|
#define ADDOP_IN_SCOPE(C, LOC, OP) { \
|
||||||
if (cfg_builder_addop_noarg(CFG_BUILDER(C), (OP), (LOC)) < 0) { \
|
if (cfg_builder_addop_noarg(CFG_BUILDER(C), (OP), (LOC)) < 0) { \
|
||||||
compiler_exit_scope(c); \
|
compiler_exit_scope(C); \
|
||||||
return -1; \
|
return -1; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -1692,7 +1692,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
|
||||||
|
|
||||||
#define VISIT_IN_SCOPE(C, TYPE, V) {\
|
#define VISIT_IN_SCOPE(C, TYPE, V) {\
|
||||||
if (compiler_visit_ ## TYPE((C), (V)) < 0) { \
|
if (compiler_visit_ ## TYPE((C), (V)) < 0) { \
|
||||||
compiler_exit_scope(c); \
|
compiler_exit_scope(C); \
|
||||||
return ERROR; \
|
return ERROR; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
@ -1713,7 +1713,7 @@ cfg_builder_addop_j(cfg_builder *g, location loc,
|
||||||
for (_i = 0; _i < asdl_seq_LEN(seq); _i++) { \
|
for (_i = 0; _i < asdl_seq_LEN(seq); _i++) { \
|
||||||
TYPE ## _ty elt = (TYPE ## _ty)asdl_seq_GET(seq, _i); \
|
TYPE ## _ty elt = (TYPE ## _ty)asdl_seq_GET(seq, _i); \
|
||||||
if (compiler_visit_ ## TYPE((C), elt) < 0) { \
|
if (compiler_visit_ ## TYPE((C), elt) < 0) { \
|
||||||
compiler_exit_scope(c); \
|
compiler_exit_scope(C); \
|
||||||
return ERROR; \
|
return ERROR; \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue