mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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>
This commit is contained in:
parent
8473cf89bd
commit
b8fa135908
7 changed files with 101 additions and 113 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue