mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
bpo-38304: Remove PyConfig.struct_size (GH-16500) (GH-16508)
For now, we'll rely on the fact that the config structures aren't covered by the stable ABI.
We may revisit this in the future if we further explore the idea of offering a stable embedding API.
(cherry picked from commit bdace21b76
)
This commit is contained in:
parent
94e165096f
commit
3c30a76f3d
14 changed files with 39 additions and 273 deletions
|
@ -165,12 +165,8 @@ int
|
|||
wmain(int argc, wchar_t **argv)
|
||||
{
|
||||
PyStatus status;
|
||||
|
||||
PyPreConfig preconfig;
|
||||
preconfig.struct_size = sizeof(PyPreConfig);
|
||||
|
||||
PyConfig config;
|
||||
config.struct_size = sizeof(PyConfig);
|
||||
|
||||
const wchar_t *moduleName = NULL;
|
||||
const wchar_t *p = wcsrchr(argv[0], L'\\');
|
||||
|
@ -189,10 +185,7 @@ wmain(int argc, wchar_t **argv)
|
|||
}
|
||||
}
|
||||
|
||||
status = PyPreConfig_InitPythonConfig(&preconfig);
|
||||
if (PyStatus_Exception(status)) {
|
||||
goto fail_without_config;
|
||||
}
|
||||
PyPreConfig_InitPythonConfig(&preconfig);
|
||||
if (!moduleName) {
|
||||
status = Py_PreInitializeFromArgs(&preconfig, argc, argv);
|
||||
if (PyStatus_Exception(status)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue