summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index a3fcd53..3fd8491 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -331,6 +331,10 @@ PyAST_CompileObject(mod_ty mod, PyObject *filename, PyCompilerFlags *flags,
c.c_optimize = (optimize == -1) ? Py_OptimizeFlag : optimize;
c.c_nestlevel = 0;
+ if (!_PyAST_Optimize(mod, arena)) {
+ goto finally;
+ }
+
c.c_st = PySymtable_BuildObject(mod, filename, c.c_future);
if (c.c_st == NULL) {
if (!PyErr_Occurred())