diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-03-23 11:05:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-23 11:05:43 (GMT) |
commit | 6d5ee973f0600a3a9444f569dcf0dd346bfa2a11 (patch) | |
tree | d10610b71d1dbff047e5ed912d82bff298e45537 /Python/pystate.c | |
parent | 2b75155590eb42d25e474b776ee9fdcc4b3dc840 (diff) | |
download | cpython-6d5ee973f0600a3a9444f569dcf0dd346bfa2a11.zip cpython-6d5ee973f0600a3a9444f569dcf0dd346bfa2a11.tar.gz cpython-6d5ee973f0600a3a9444f569dcf0dd346bfa2a11.tar.bz2 |
bpo-36301: Add _PyRuntimeState.preconfig (GH-12506)
_PyPreConfig_Write() now writes the applied pre-configuration into
_PyRuntimeState.preconfig.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 36566b7..6fe3dd1 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -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); } |