summaryrefslogtreecommitdiff
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index dec890485b..c955a1d94f 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -482,9 +482,9 @@ _Py_Initialize_ReconfigureCore(PyInterpreterState **interp_p,
/* bpo-34008: For backward compatibility reasons, calling Py_Main() after
Py_Initialize() ignores the new configuration. */
- if (core_config->allocator != NULL) {
+ if (core_config->preconfig.allocator != NULL) {
const char *allocator = _PyMem_GetAllocatorsName();
- if (allocator == NULL || strcmp(core_config->allocator, allocator) != 0) {
+ if (allocator == NULL || strcmp(core_config->preconfig.allocator, allocator) != 0) {
return _Py_INIT_USER_ERR("cannot modify memory allocator "
"after first Py_Initialize()");
}
@@ -521,8 +521,8 @@ pycore_init_runtime(const _PyCoreConfig *core_config)
return err;
}
- if (core_config->allocator != NULL) {
- if (_PyMem_SetupAllocators(core_config->allocator) < 0) {
+ if (core_config->preconfig.allocator != NULL) {
+ if (_PyMem_SetupAllocators(core_config->preconfig.allocator) < 0) {
return _Py_INIT_USER_ERR("Unknown PYTHONMALLOC allocator");
}
}