@@ -32,20 +32,16 @@ extern int _PyImport_FixupBuiltin(
3232 PyObject * modules
3333 );
3434
35- extern PyObject * _PyImport_ResolveName (
36- PyThreadState * tstate , PyObject * name , PyObject * globals , int level );
3735extern PyObject * _PyImport_GetAbsName (
3836 PyThreadState * tstate , PyObject * name , PyObject * globals , int level );
3937// Symbol is exported for the JIT on Windows builds.
4038PyAPI_FUNC (PyObject * ) _PyImport_LoadLazyImportTstate (
4139 PyThreadState * tstate , PyObject * lazy_import );
42- typedef enum {
43- _Py_LAZY_SUBMODULE_ERROR = -1 ,
44- _Py_LAZY_SUBMODULE_NOT_FOUND = 0 ,
45- _Py_LAZY_SUBMODULE_LOADED = 1 ,
46- } _PyLazySubmoduleImportResult ;
47- extern _PyLazySubmoduleImportResult _PyImport_TryLoadLazySubmodule (
48- PyObject * mod_name , PyObject * attr_name , PyObject * * result );
40+ // Bind a pending child on module before removing its registration. Return a
41+ // new reference, NULL without an exception if absent, or NULL on error.
42+ // Set recheck_dict if a concurrent lookup may have already bound the child.
43+ extern PyObject * _PyImport_TryLoadLazySubmodule (
44+ PyObject * module , PyObject * attr_name , int * recheck_dict );
4945extern PyObject * _PyImport_LazyImportModuleLevelObject (
5046 PyThreadState * tstate , PyObject * name , PyObject * builtins ,
5147 PyObject * globals , PyObject * locals , PyObject * fromlist , int level );
0 commit comments