diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-09-30 22:46:42 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2019-09-30 22:46:42 (GMT) |
commit | bdace21b769998396d0ccc8da99a8ca9b507bfdf (patch) | |
tree | de149589d8dd498ddf3574e9d9551951d3f7e79b /Python/pylifecycle.c | |
parent | 92ca515ee1efbdc51678e12d105ad642c9b9cc13 (diff) | |
download | cpython-bdace21b769998396d0ccc8da99a8ca9b507bfdf.zip cpython-bdace21b769998396d0ccc8da99a8ca9b507bfdf.tar.gz cpython-bdace21b769998396d0ccc8da99a8ca9b507bfdf.tar.bz2 |
bpo-38304: Remove PyConfig.struct_size (GH-16500)
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.
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index c154d06..5174f74 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -731,7 +731,6 @@ _Py_PreInitializeFromPyArgv(const PyPreConfig *src_config, const _PyArgv *args) runtime->preinitializing = 1; PyPreConfig config; - config.struct_size = sizeof(PyPreConfig); status = _PyPreConfig_InitFromPreConfig(&config, src_config); if (_PyStatus_EXCEPTION(status)) { @@ -795,12 +794,8 @@ _Py_PreInitializeFromConfig(const PyConfig *config, } PyPreConfig preconfig; - preconfig.struct_size = sizeof(PyPreConfig); - status = _PyPreConfig_InitFromConfig(&preconfig, config); - if (_PyStatus_EXCEPTION(status)) { - return status; - } + _PyPreConfig_InitFromConfig(&preconfig, config); if (!config->parse_argv) { return Py_PreInitialize(&preconfig); @@ -848,7 +843,6 @@ pyinit_core(_PyRuntimeState *runtime, } PyConfig config; - config.struct_size = sizeof(PyConfig); status = _PyConfig_InitCompatConfig(&config); if (_PyStatus_EXCEPTION(status)) { @@ -1076,7 +1070,6 @@ Py_InitializeEx(int install_sigs) } PyConfig config; - config.struct_size = sizeof(PyConfig); status = _PyConfig_InitCompatConfig(&config); if (_PyStatus_EXCEPTION(status)) { |