diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2024-09-16 13:58:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 13:58:18 (GMT) |
commit | 9aa1f60e2dedd8a67c42fb4f4c56858b6ba5b947 (patch) | |
tree | a81811ff65734eba9708a05f8fc73e1e5228cb47 /Python/codegen.c | |
parent | 453da532fee26dc4f83d4cab77eb9bdb17b941e6 (diff) | |
download | cpython-9aa1f60e2dedd8a67c42fb4f4c56858b6ba5b947.zip cpython-9aa1f60e2dedd8a67c42fb4f4c56858b6ba5b947.tar.gz cpython-9aa1f60e2dedd8a67c42fb4f4c56858b6ba5b947.tar.bz2 |
gh-124058: remove _PyCompile_IsNestedScope, roll it into _PyCompile_IsInteractive (#124061)
Diffstat (limited to 'Python/codegen.c')
-rw-r--r-- | Python/codegen.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/codegen.c b/Python/codegen.c index 5565d30..0305f42 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -70,8 +70,7 @@ typedef struct _PyCompiler compiler; #define SYMTABLE(C) _PyCompile_Symtable(C) #define SYMTABLE_ENTRY(C) _PyCompile_SymtableEntry(C) #define OPTIMIZATION_LEVEL(C) _PyCompile_OptimizationLevel(C) -#define IS_INTERACTIVE(C) _PyCompile_IsInteractive(C) -#define IS_NESTED_SCOPE(C) _PyCompile_IsNestedScope(C) +#define IS_INTERACTIVE_TOP_LEVEL(C) _PyCompile_IsInteractiveTopLevel(C) #define SCOPE_TYPE(C) _PyCompile_ScopeType(C) #define QUALNAME(C) _PyCompile_Qualname(C) #define METADATA(C) _PyCompile_Metadata(C) @@ -2823,7 +2822,7 @@ codegen_assert(compiler *c, stmt_ty s) static int codegen_stmt_expr(compiler *c, location loc, expr_ty value) { - if (IS_INTERACTIVE(c) && !IS_NESTED_SCOPE(c)) { + if (IS_INTERACTIVE_TOP_LEVEL(c)) { VISIT(c, expr, value); ADDOP_I(c, loc, CALL_INTRINSIC_1, INTRINSIC_PRINT); ADDOP(c, NO_LOCATION, POP_TOP); |