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
2
Python/executor_cases.c.h
generated
2
Python/executor_cases.c.h
generated
|
|
@ -2491,7 +2491,7 @@
|
|||
_PyFrame_SetStackPointer(frame, stack_pointer);
|
||||
PyObject *l_v = _PyImport_LoadLazyImportTstate(tstate, res_o);
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
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