bpo-36818: Add PyInterpreterState.runtime field. (gh-13129)
https://bugs.python.org/issue36818
diff --git a/Python/import.c b/Python/import.c
index ab7db6b..68d1f40 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -541,7 +541,8 @@
_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