summaryrefslogtreecommitdiffstats
path: root/Include/internal
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-24 15:24:01 (GMT)
committerGitHub <noreply@github.com>2019-04-24 15:24:01 (GMT)
commit8e91c246e468515b877690e090c73f496552541d (patch)
treed538530b4ac5ccf9aa6dc1e229410b8848eeb4f3 /Include/internal
parent70bf713617e15fad390ed953e48b3c65d9bc90ec (diff)
downloadcpython-8e91c246e468515b877690e090c73f496552541d.zip
cpython-8e91c246e468515b877690e090c73f496552541d.tar.gz
cpython-8e91c246e468515b877690e090c73f496552541d.tar.bz2
bpo-36710: Add runtime variable to Py_FinalizeEx() (GH-12937)
* Add a 'runtime' variable to Py_FinalizeEx() rather than working directly on the global variable _PyRuntime * Add a 'runtime' parameter to _PyGC_Fini(), _PyGILState_Fini() and call_ll_exitfuncs()
Diffstat (limited to 'Include/internal')
-rw-r--r--Include/internal/pycore_pylifecycle.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h
index bfff24b..f07bc42 100644
--- a/Include/internal/pycore_pylifecycle.h
+++ b/Include/internal/pycore_pylifecycle.h
@@ -8,6 +8,8 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
+#include "pycore_pystate.h" /* _PyRuntimeState */
+
/* True if the main interpreter thread exited due to an unhandled
* KeyboardInterrupt exception, suggesting the user pressed ^C. */
PyAPI_DATA(int) _Py_UnhandledKeyboardInterrupt;
@@ -63,7 +65,7 @@ extern void PyAsyncGen_Fini(void);
extern void _PyExc_Fini(void);
extern void _PyImport_Fini(void);
extern void _PyImport_Fini2(void);
-extern void _PyGC_Fini(void);
+extern void _PyGC_Fini(_PyRuntimeState *runtime);
extern void _PyType_Fini(void);
extern void _Py_HashRandomization_Fini(void);
extern void _PyUnicode_Fini(void);
@@ -73,7 +75,7 @@ extern void _PyHash_Fini(void);
extern int _PyTraceMalloc_Fini(void);
extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *);
-extern void _PyGILState_Fini(void);
+extern void _PyGILState_Fini(_PyRuntimeState *runtime);
PyAPI_FUNC(void) _PyGC_DumpShutdownStats(void);