bpo-36142: _PyPreConfig_Write() sets the allocator (GH-12186)

* _PyPreConfig_Write() now sets the memory allocator.
* _PyPreConfig_Write() gets a return type: _PyInitError.
* _Py_InitializeCore() now reads and writes the pre-configuration
  (set the memory allocator, configure the locale) before reading and
  writing the core configuration.
This commit is contained in:
Victor Stinner 2019-03-06 00:36:56 +01:00 committed by GitHub
parent a9df651eb4
commit 7d2ef3ef50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 95 additions and 43 deletions

View file

@ -304,8 +304,7 @@ preconfig_read_write(_PyPreConfig *config, const _PyArgv *args)
return err;
}
_PyPreConfig_Write(config);
return _Py_INIT_OK();
return _PyPreConfig_Write(config);
}