mirror of
https://github.com/python/cpython.git
synced 2025-09-11 11:17:16 +00:00

Convert the _imp extension module to the multi-phase initialization API (PEP 489). * Add _PyImport_BootstrapImp() which fix a bootstrap issue: import the _imp module before importlib is initialized. * Add create_builtin() sub-function, used by _imp_create_builtin(). * Initialize PyInterpreterState.import_func earlier, in pycore_init_builtins(). * Remove references to _PyImport_Cleanup(). This function has been renamed to finalize_modules() and moved to pylifecycle.c.
22 lines
487 B
C
22 lines
487 B
C
#ifndef Py_LIMITED_API
|
|
#ifndef Py_INTERNAL_IMPORT_H
|
|
#define Py_INTERNAL_IMPORT_H
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin(
|
|
PyThreadState *tstate,
|
|
const char *name /* UTF-8 encoded string */
|
|
);
|
|
|
|
#ifdef HAVE_FORK
|
|
extern PyStatus _PyImport_ReInitLock(void);
|
|
#endif
|
|
extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* !Py_INTERNAL_IMPORT_H */
|
|
#endif /* !Py_LIMITED_API */
|