summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_pylifecycle.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-24 16:23:53 (GMT)
committerGitHub <noreply@github.com>2019-04-24 16:23:53 (GMT)
commit43125224d6da5febb34101ebfd36536d791d68cd (patch)
treebbfc1e3bd576c09b48b1b8787998a1eeb472697a /Include/internal/pycore_pylifecycle.h
parent8e91c246e468515b877690e090c73f496552541d (diff)
downloadcpython-43125224d6da5febb34101ebfd36536d791d68cd.zip
cpython-43125224d6da5febb34101ebfd36536d791d68cd.tar.gz
cpython-43125224d6da5febb34101ebfd36536d791d68cd.tar.bz2
bpo-36710: Add runtime variable to Py_InitializeEx() (GH-12939)
Py_InitializeEx() now uses a runtime variable passed to subfunctions, rather than working directly on the global variable _PyRuntime. Add 'runtime' parameter to _PyCoreConfig_Write(), _PySys_Create(), _PySys_InitMain(), _PyGILState_Init(), emit_stderr_warning_for_legacy_locale() and other subfunctions.
Diffstat (limited to 'Include/internal/pycore_pylifecycle.h')
-rw-r--r--Include/internal/pycore_pylifecycle.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h
index f07bc42..69709b1 100644
--- a/Include/internal/pycore_pylifecycle.h
+++ b/Include/internal/pycore_pylifecycle.h
@@ -34,10 +34,13 @@ extern _PyInitError _PyFaulthandler_Init(int enable);
extern int _PyTraceMalloc_Init(int enable);
extern PyObject * _PyBuiltin_Init(void);
extern _PyInitError _PySys_Create(
+ _PyRuntimeState *runtime,
PyInterpreterState *interp,
PyObject **sysmod_p);
extern _PyInitError _PySys_SetPreliminaryStderr(PyObject *sysdict);
-extern int _PySys_InitMain(PyInterpreterState *interp);
+extern int _PySys_InitMain(
+ _PyRuntimeState *runtime,
+ PyInterpreterState *interp);
extern _PyInitError _PyImport_Init(PyInterpreterState *interp);
extern _PyInitError _PyExc_Init(void);
extern _PyInitError _PyBuiltins_AddExceptions(PyObject * bltinmod);
@@ -74,7 +77,10 @@ extern void _PyFaulthandler_Fini(void);
extern void _PyHash_Fini(void);
extern int _PyTraceMalloc_Fini(void);
-extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *);
+extern void _PyGILState_Init(
+ _PyRuntimeState *runtime,
+ PyInterpreterState *interp,
+ PyThreadState *tstate);
extern void _PyGILState_Fini(_PyRuntimeState *runtime);
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);