mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Fix recursive lazy imports and error path in bytecodes.c
This commit is contained in:
parent
f9880bfd5f
commit
f3f5795e31
6 changed files with 18 additions and 6 deletions
|
|
@ -1835,7 +1835,7 @@ dummy_func(
|
|||
PyObject *res_o = PyStackRef_AsPyObjectBorrow(*res);
|
||||
if (PyLazyImport_CheckExact(res_o)) {
|
||||
PyObject *l_v = _PyImport_LoadLazyImportTstate(tstate, res_o);
|
||||
if (PyDict_SetItem(GLOBALS(), name, l_v) < 0) {
|
||||
if (l_v != NULL && PyDict_SetItem(GLOBALS(), name, l_v) < 0) {
|
||||
JUMP_TO_LABEL(error);
|
||||
}
|
||||
res_o = l_v;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue