mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
(cherry picked from commit 6c832ddcf2
)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
c28887d059
commit
90e357bc8a
2 changed files with 6 additions and 1 deletions
|
@ -1736,8 +1736,12 @@ compiler_enter_scope(struct compiler *c, identifier name,
|
|||
Py_INCREF(name);
|
||||
u->u_name = name;
|
||||
u->u_varnames = list2dict(u->u_ste->ste_varnames);
|
||||
if (!u->u_varnames) {
|
||||
compiler_unit_free(u);
|
||||
return 0;
|
||||
}
|
||||
u->u_cellvars = dictbytype(u->u_ste->ste_symbols, CELL, 0, 0);
|
||||
if (!u->u_varnames || !u->u_cellvars) {
|
||||
if (!u->u_cellvars) {
|
||||
compiler_unit_free(u);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue