@@ -32,20 +32,18 @@ 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 suppress , int * recheck_dict ) ;
45+ extern int _PyImport_ClearLazySubmodule (
46+ PyThreadState * tstate , PyObject * name , int bind );
4947extern PyObject * _PyImport_LazyImportModuleLevelObject (
5048 PyThreadState * tstate , PyObject * name , PyObject * builtins ,
5149 PyObject * globals , PyObject * locals , PyObject * fromlist , int level );
@@ -91,6 +89,8 @@ extern void _PyImport_ClearModulesByIndex(PyInterpreterState *interp);
9189extern PyObject * _PyImport_InitLazyModules (
9290 PyInterpreterState * interp );
9391extern void _PyImport_ClearLazyModules (PyInterpreterState * interp );
92+ extern int _PyImport_DiscardLazyModule (
93+ PyInterpreterState * interp , PyObject * name );
9494
9595extern int _PyImport_InitDefaultImportFunc (PyInterpreterState * interp );
9696extern int _PyImport_IsDefaultImportFunc (
0 commit comments