bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)

https://bugs.python.org/issue36818
This commit is contained in:
Eric Snow 2019-05-31 21:16:47 -06:00 committed by GitHub
parent 1c263e39c4
commit 396e0a8d9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 99 additions and 103 deletions

View file

@ -541,7 +541,8 @@ PyImport_Cleanup(void)
_PyGC_CollectNoFail();
/* Dump GC stats before it's too late, since it uses the warnings
machinery. */
_PyGC_DumpShutdownStats(&_PyRuntime);
_PyRuntimeState *runtime = interp->runtime;
_PyGC_DumpShutdownStats(runtime);
/* Now, if there are any modules left alive, clear their globals to
minimize potential leaks. All C extension modules actually end