mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-106320: Remove private _PyImport C API functions (#106383)
* Remove private _PyImport C API functions: move them to the internal C API (pycore_import.h). * No longer export most of these private functions. * _testcapi avoids private _PyImport_GetModuleAttrString().
This commit is contained in:
parent
f6d2bb18ab
commit
2e92edbf6d
8 changed files with 46 additions and 22 deletions
|
|
@ -7,6 +7,26 @@ extern "C" {
|
|||
|
||||
#include "pycore_time.h" // _PyTime_t
|
||||
|
||||
extern int _PyImport_IsInitialized(PyInterpreterState *);
|
||||
|
||||
PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(_Py_Identifier *name);
|
||||
PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module);
|
||||
PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module);
|
||||
|
||||
extern void _PyImport_AcquireLock(PyInterpreterState *interp);
|
||||
extern int _PyImport_ReleaseLock(PyInterpreterState *interp);
|
||||
|
||||
extern int _PyImport_FixupBuiltin(
|
||||
PyObject *mod,
|
||||
const char *name, /* UTF-8 encoded string */
|
||||
PyObject *modules
|
||||
);
|
||||
extern int _PyImport_FixupExtensionObject(PyObject*, PyObject *,
|
||||
PyObject *, PyObject *);
|
||||
|
||||
PyAPI_DATA(PyObject *) _PyImport_GetModuleAttr(PyObject *, PyObject *);
|
||||
PyAPI_DATA(PyObject *) _PyImport_GetModuleAttrString(const char *, const char *);
|
||||
|
||||
|
||||
struct _import_runtime_state {
|
||||
/* The builtin modules (defined in config.c). */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue