diff options
author | Victor Stinner <vstinner@python.org> | 2020-12-15 13:34:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 13:34:19 (GMT) |
commit | b8fa135908d294b350cdad04e2f512327a538dee (patch) | |
tree | 25b6b1516e3f6d29c9cf3cafb71c516cbc93a3c3 /Python/pystate.c | |
parent | 8473cf89bdbf2cb292b39c972db540504669b9cd (diff) | |
download | cpython-b8fa135908d294b350cdad04e2f512327a538dee.zip cpython-b8fa135908d294b350cdad04e2f512327a538dee.tar.gz cpython-b8fa135908d294b350cdad04e2f512327a538dee.tar.bz2 |
bpo-42639: Move atexit state to PyInterpreterState (GH-23763)
* Add _PyAtExit_Call() function and remove pyexitfunc and
pyexitmodule members of PyInterpreterState. The function
logs atexit callback errors using _PyErr_WriteUnraisableMsg().
* Add _PyAtExit_Init() and _PyAtExit_Fini() functions.
* Remove traverse, clear and free functions of the atexit module.
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 8da583f..ead25b0 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -303,6 +303,7 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate) _PyAST_Fini(interp); _PyWarnings_Fini(interp); + _PyAtExit_Fini(interp); // All Python types must be destroyed before the last GC collection. Python // types create a reference cycle to themselves in their in their |