mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-32365: Fix a reference leak when compile __debug__. (#4916)
It was introduced in bpo-27169.
This commit is contained in:
parent
b2a6083eb0
commit
bd6ec4d79e
1 changed files with 4 additions and 4 deletions
|
@ -3094,10 +3094,6 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
||||||
PyObject *mangled;
|
PyObject *mangled;
|
||||||
/* XXX AugStore isn't used anywhere! */
|
/* XXX AugStore isn't used anywhere! */
|
||||||
|
|
||||||
mangled = _Py_Mangle(c->u->u_private, name);
|
|
||||||
if (!mangled)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
assert(!_PyUnicode_EqualToASCIIString(name, "None") &&
|
assert(!_PyUnicode_EqualToASCIIString(name, "None") &&
|
||||||
!_PyUnicode_EqualToASCIIString(name, "True") &&
|
!_PyUnicode_EqualToASCIIString(name, "True") &&
|
||||||
!_PyUnicode_EqualToASCIIString(name, "False"));
|
!_PyUnicode_EqualToASCIIString(name, "False"));
|
||||||
|
@ -3107,6 +3103,10 @@ compiler_nameop(struct compiler *c, identifier name, expr_context_ty ctx)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mangled = _Py_Mangle(c->u->u_private, name);
|
||||||
|
if (!mangled)
|
||||||
|
return 0;
|
||||||
|
|
||||||
op = 0;
|
op = 0;
|
||||||
optype = OP_NAME;
|
optype = OP_NAME;
|
||||||
scope = PyST_GetScope(c->u->u_ste, mangled);
|
scope = PyST_GetScope(c->u->u_ste, mangled);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue