summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-06-19 08:36:10 (GMT)
committerGitHub <noreply@github.com>2019-06-19 08:36:10 (GMT)
commit987a0dcfa1302df6c1ed8cf14762dc18628e3f33 (patch)
treee5067c951f469056947e4b2c3312503610424abc /Python/pylifecycle.c
parent7821b4c6d29933511d50bb42255e39790c6abf00 (diff)
downloadcpython-987a0dcfa1302df6c1ed8cf14762dc18628e3f33.zip
cpython-987a0dcfa1302df6c1ed8cf14762dc18628e3f33.tar.gz
cpython-987a0dcfa1302df6c1ed8cf14762dc18628e3f33.tar.bz2
bpo-36710: Remove PyImport_Cleanup() function (GH-14221)
* Rename PyImport_Cleanup() to _PyImport_Cleanup() and move it to the internal C API. Add 'tstate' parameters. * Remove documentation of _PyImport_Init(), PyImport_Cleanup(), _PyImport_Fini(). All three were documented as "For internal use only.".
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 4a97295..c0b3450 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1225,7 +1225,7 @@ Py_FinalizeEx(void)
_PySys_ClearAuditHooks();
/* Destroy all modules */
- PyImport_Cleanup();
+ _PyImport_Cleanup(tstate);
/* Print debug stats if any */
_PyEval_Fini();
@@ -1589,7 +1589,7 @@ Py_EndInterpreter(PyThreadState *tstate)
if (tstate != interp->tstate_head || tstate->next != NULL)
Py_FatalError("Py_EndInterpreter: not the last thread");
- PyImport_Cleanup();
+ _PyImport_Cleanup(tstate);
PyInterpreterState_Clear(interp);
PyThreadState_Swap(NULL);
PyInterpreterState_Delete(interp);