summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-23 11:05:43 (GMT)
committerGitHub <noreply@github.com>2019-03-23 11:05:43 (GMT)
commit6d5ee973f0600a3a9444f569dcf0dd346bfa2a11 (patch)
treed10610b71d1dbff047e5ed912d82bff298e45537 /Python/pystate.c
parent2b75155590eb42d25e474b776ee9fdcc4b3dc840 (diff)
downloadcpython-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.c3
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);
}