mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #19437: Fix init_builtin(), handle _PyImport_FindExtensionObject()
failure
This commit is contained in:
@@ -948,8 +948,12 @@ static int
|
||||
init_builtin(PyObject *name)
|
||||
{
|
||||
struct _inittab *p;
|
||||
PyObject *mod;
|
||||
|
||||
if (_PyImport_FindExtensionObject(name, name) != NULL)
|
||||
mod = _PyImport_FindExtensionObject(name, name);
|
||||
if (PyErr_Occurred())
|
||||
return -1;
|
||||
if (mod != NULL)
|
||||
return 1;
|
||||
|
||||
for (p = PyImport_Inittab; p->name != NULL; p++) {
|
||||
|
||||
Reference in New Issue
Block a user