mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-104482: Fix error handling bugs in ast.c (#104483)
This commit is contained in:
parent
26baa747c2
commit
8a3702f0c7
4 changed files with 45 additions and 19 deletions
|
@ -567,6 +567,7 @@ PyCodeObject *
|
|||
_PyAST_Compile(mod_ty mod, PyObject *filename, PyCompilerFlags *pflags,
|
||||
int optimize, PyArena *arena)
|
||||
{
|
||||
assert(!PyErr_Occurred());
|
||||
struct compiler *c = new_compiler(mod, filename, pflags, optimize, arena);
|
||||
if (c == NULL) {
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue