summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-08-21 16:31:30 (GMT)
committerGitHub <noreply@github.com>2023-08-21 16:31:30 (GMT)
commit10a91d7e98d847b05292eab828ff9ae51308d3ee (patch)
treea81f95a971c03710f13217cf89e0f12532341af8 /Python/Python-ast.c
parent47022a079eb9d2a2af781abae3de4a71f80247c2 (diff)
downloadcpython-10a91d7e98d847b05292eab828ff9ae51308d3ee.zip
cpython-10a91d7e98d847b05292eab828ff9ae51308d3ee.tar.gz
cpython-10a91d7e98d847b05292eab828ff9ae51308d3ee.tar.bz2
gh-108113: Make it possible to create an optimized AST (#108154)
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 8047b12..60dd121 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -12659,6 +12659,9 @@ astmodule_exec(PyObject *m)
if (PyModule_AddIntMacro(m, PyCF_TYPE_COMMENTS) < 0) {
return -1;
}
+ if (PyModule_AddIntMacro(m, PyCF_OPTIMIZED_AST) < 0) {
+ return -1;
+ }
if (PyModule_AddObjectRef(m, "mod", state->mod_type) < 0) {
return -1;
}