mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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:
parent
488d02a241
commit
7247407c35
8 changed files with 62 additions and 49 deletions
|
|
@ -58,7 +58,6 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime)
|
|||
runtime->open_code_userdata = open_code_userdata;
|
||||
runtime->audit_hook_head = audit_hook_head;
|
||||
|
||||
_PyGC_InitializeRuntime(&runtime->gc);
|
||||
_PyEval_Initialize(&runtime->ceval);
|
||||
|
||||
PyPreConfig_InitPythonConfig(&runtime->preconfig);
|
||||
|
|
@ -208,6 +207,7 @@ PyInterpreterState_New(void)
|
|||
_PyRuntimeState *runtime = &_PyRuntime;
|
||||
interp->runtime = runtime;
|
||||
|
||||
_PyGC_InitState(&interp->gc);
|
||||
PyConfig_InitPythonConfig(&interp->config);
|
||||
|
||||
interp->eval_frame = _PyEval_EvalFrameDefault;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue