bpo-36854: Move _PyRuntimeState.gc to PyInterpreterState (GH-17287)

* Rename _PyGC_InitializeRuntime() to _PyGC_InitState()
* finalize_interp_clear() now also calls _PyGC_Fini() in
  subinterpreters (clear the GC state).
This commit is contained in:
Victor Stinner 2019-11-20 12:25:50 +01:00 committed by GitHub
parent 488d02a241
commit 7247407c35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 49 deletions

View file

@ -74,6 +74,8 @@ struct _is {
int finalizing;
struct _gc_runtime_state gc;
PyObject *modules;
PyObject *modules_by_index;
PyObject *sysdict;
@ -130,9 +132,7 @@ struct _is {
struct _warnings_runtime_state warnings;
PyObject *audit_hooks;
/*
* See bpo-36876: miscellaneous ad hoc statics have been moved here.
*/
struct {
struct {
int level;
@ -239,7 +239,6 @@ typedef struct pyruntimestate {
void (*exitfuncs[NEXITFUNCS])(void);
int nexitfuncs;
struct _gc_runtime_state gc;
struct _ceval_runtime_state ceval;
struct _gilstate_runtime_state gilstate;