diff options
| author | Victor Stinner <vstinner@redhat.com> | 2019-06-19 02:54:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-19 02:54:39 +0200 |
| commit | 0a28f8d379544eee897979da0ce99f0b449b49dd (patch) | |
| tree | 8bf54f5ac2e9c3fd7beff5f6fa529a4f2269f3fb /Include/cpython | |
| parent | 809ff1181ccc09c3b629f3d0ec66e13eaa111b2e (diff) | |
| download | cpython-git-0a28f8d379544eee897979da0ce99f0b449b49dd.tar.gz | |
bpo-36710: Add tstate parameter in import.c (GH-14218)
* Add 'tstate' parameter to many internal import.c functions.
* _PyImportZip_Init() now gets 'tstate' parameter rather than
'interp'.
* Add 'interp' parameter to _PyState_ClearModules() and rename it
to _PyInterpreterState_ClearModules().
* Move private _PyImport_FindBuiltin() to the internal C API; add
'tstate' parameter to it.
* Remove private _PyImport_AddModuleObject() from the C API:
use public PyImport_AddModuleObject() instead.
* Remove private _PyImport_FindExtensionObjectEx() from the C API:
use private _PyImport_FindExtensionObject() instead.
Diffstat (limited to 'Include/cpython')
| -rw-r--r-- | Include/cpython/import.h | 9 | ||||
| -rw-r--r-- | Include/cpython/pystate.h | 1 |
2 files changed, 1 insertions, 9 deletions
diff --git a/Include/cpython/import.h b/Include/cpython/import.h index 8dd7a0c5a4..c1b47121f1 100644 --- a/Include/cpython/import.h +++ b/Include/cpython/import.h @@ -11,21 +11,14 @@ PyMODINIT_FUNC PyInit__imp(void); PyAPI_FUNC(int) _PyImport_IsInitialized(PyInterpreterState *); PyAPI_FUNC(PyObject *) _PyImport_GetModuleId(struct _Py_Identifier *name); -PyAPI_FUNC(PyObject *) _PyImport_AddModuleObject(PyObject *name, - PyObject *modules); PyAPI_FUNC(int) _PyImport_SetModule(PyObject *name, PyObject *module); PyAPI_FUNC(int) _PyImport_SetModuleString(const char *name, PyObject* module); PyAPI_FUNC(void) _PyImport_AcquireLock(void); PyAPI_FUNC(int) _PyImport_ReleaseLock(void); -PyAPI_FUNC(PyObject *) _PyImport_FindBuiltin( - const char *name, /* UTF-8 encoded string */ - PyObject *modules - ); PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObject(PyObject *, PyObject *); -PyAPI_FUNC(PyObject *) _PyImport_FindExtensionObjectEx(PyObject *, PyObject *, - PyObject *); + PyAPI_FUNC(int) _PyImport_FixupBuiltin( PyObject *mod, const char *name, /* UTF-8 encoded string */ diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index 94b0809cd4..f872351780 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -148,7 +148,6 @@ struct _ts { PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_Get(void); PyAPI_FUNC(int) _PyState_AddModule(PyObject*, struct PyModuleDef*); -PyAPI_FUNC(void) _PyState_ClearModules(void); PyAPI_FUNC(PyThreadState *) _PyThreadState_Prealloc(PyInterpreterState *); /* Similar to PyThreadState_Get(), but don't issue a fatal error |
