diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-19 22:05:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 22:05:23 (GMT) |
commit | b45d259bdda1de2b2d369458a9ad2e4d6f750687 (patch) | |
tree | 7e4b308f1729b757ebead804cde061bb06832cab /Include | |
parent | 35068bd059a3d9bff084ca9dcb04d51185b9ec3b (diff) | |
download | cpython-b45d259bdda1de2b2d369458a9ad2e4d6f750687.zip cpython-b45d259bdda1de2b2d369458a9ad2e4d6f750687.tar.gz cpython-b45d259bdda1de2b2d369458a9ad2e4d6f750687.tar.bz2 |
bpo-36710: Use tstate in pylifecycle.c (GH-14249)
In pylifecycle.c: pass tstate argument, rather than interp argument,
to functions.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_pylifecycle.h | 11 | ||||
-rw-r--r-- | Include/internal/pycore_pystate.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index 1c475b1..da4af47 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -21,7 +21,7 @@ extern int _Py_SetFileSystemEncoding( const char *encoding, const char *errors); extern void _Py_ClearFileSystemEncoding(void); -extern PyStatus _PyUnicode_InitEncodings(PyInterpreterState *interp); +extern PyStatus _PyUnicode_InitEncodings(PyThreadState *tstate); #ifdef MS_WINDOWS extern int _PyUnicode_EnableLegacyWindowsFSEncoding(void); #endif @@ -37,20 +37,20 @@ extern int _PyStructSequence_Init(void); extern int _PyLong_Init(void); extern PyStatus _PyFaulthandler_Init(int enable); extern int _PyTraceMalloc_Init(int enable); -extern PyObject * _PyBuiltin_Init(void); +extern PyObject * _PyBuiltin_Init(PyThreadState *tstate); extern PyStatus _PySys_Create( _PyRuntimeState *runtime, - PyInterpreterState *interp, + PyThreadState *tstate, PyObject **sysmod_p); extern PyStatus _PySys_SetPreliminaryStderr(PyObject *sysdict); extern int _PySys_InitMain( _PyRuntimeState *runtime, PyThreadState *tstate); -extern PyStatus _PyImport_Init(PyInterpreterState *interp); +extern PyStatus _PyImport_Init(PyThreadState *tstate); extern PyStatus _PyExc_Init(void); extern PyStatus _PyErr_Init(void); extern PyStatus _PyBuiltins_AddExceptions(PyObject * bltinmod); -extern PyStatus _PyImportHooks_Init(void); +extern PyStatus _PyImportHooks_Init(PyThreadState *tstate); extern int _PyFloat_Init(void); extern PyStatus _Py_HashRandomization_Init(const PyConfig *); @@ -88,7 +88,6 @@ extern void _PyWarnings_Fini(PyInterpreterState *interp); extern void _PyGILState_Init( _PyRuntimeState *runtime, - PyInterpreterState *interp, PyThreadState *tstate); extern void _PyGILState_Fini(_PyRuntimeState *runtime); diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 3bfbc27..68a72d8 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -310,7 +310,7 @@ PyAPI_FUNC(PyThreadState *) _PyThreadState_Swap( PyAPI_FUNC(PyStatus) _PyInterpreterState_Enable(_PyRuntimeState *runtime); PyAPI_FUNC(void) _PyInterpreterState_DeleteExceptMain(_PyRuntimeState *runtime); -/* Used by PyImport_Cleanup() */ +/* Used by _PyImport_Cleanup() */ extern void _PyInterpreterState_ClearModules(PyInterpreterState *interp); PyAPI_FUNC(void) _PyGILState_Reinit(_PyRuntimeState *runtime); |