mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
bpo-36737: Use the module state C-API for warnings. (gh-13159)
This commit is contained in:
parent
351c67416b
commit
86ea58149c
6 changed files with 210 additions and 124 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include "pycore_coreconfig.h"
|
||||
#include "pycore_pymem.h"
|
||||
#include "pycore_pystate.h"
|
||||
#include "pycore_pylifecycle.h"
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
CAUTION
|
||||
|
|
@ -257,6 +258,9 @@ _PyInterpreterState_Clear(_PyRuntimeState *runtime, PyInterpreterState *interp)
|
|||
Py_CLEAR(interp->after_forkers_parent);
|
||||
Py_CLEAR(interp->after_forkers_child);
|
||||
#endif
|
||||
if (runtime->finalizing == NULL) {
|
||||
_PyWarnings_Fini(interp);
|
||||
}
|
||||
// XXX Once we have one allocator per interpreter (i.e.
|
||||
// per-interpreter GC) we must ensure that all of the interpreter's
|
||||
// objects have been cleaned up at the point.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue