mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
add a AST validator (closes #12575)
This commit is contained in:
486
Python/ast.c
486
Python/ast.c
File diff suppressed because it is too large
Load Diff
@@ -604,6 +604,10 @@ builtin_compile(PyObject *self, PyObject *args, PyObject *kwds)
|
||||
PyArena_Free(arena);
|
||||
goto error;
|
||||
}
|
||||
if (!PyAST_Validate(mod)) {
|
||||
PyArena_Free(arena);
|
||||
goto error;
|
||||
}
|
||||
result = (PyObject*)PyAST_CompileEx(mod, filename,
|
||||
&cf, optimize, arena);
|
||||
PyArena_Free(arena);
|
||||
|
||||
Reference in New Issue
Block a user