mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
bpo-36301: Add _PyRuntimeState.preconfig (GH-12506)
_PyPreConfig_Write() now writes the applied pre-configuration into _PyRuntimeState.preconfig.
This commit is contained in:
parent
2b75155590
commit
6d5ee973f0
4 changed files with 36 additions and 0 deletions
|
@ -41,6 +41,7 @@ _PyRuntimeState_Init_impl(_PyRuntimeState *runtime)
|
|||
|
||||
_PyGC_Initialize(&runtime->gc);
|
||||
_PyEval_Initialize(&runtime->ceval);
|
||||
runtime->preconfig = _PyPreConfig_INIT;
|
||||
|
||||
runtime->gilstate.check_enabled = 1;
|
||||
|
||||
|
@ -97,6 +98,8 @@ _PyRuntimeState_Fini(_PyRuntimeState *runtime)
|
|||
runtime->xidregistry.mutex = NULL;
|
||||
}
|
||||
|
||||
_PyPreConfig_Clear(&runtime->preconfig);
|
||||
|
||||
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &old_alloc);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue