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.
diff --git a/Python/pystate.c b/Python/pystate.c
index f0662fa..098280d 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -61,11 +61,7 @@
_PyGC_Initialize(&runtime->gc);
_PyEval_Initialize(&runtime->ceval);
- runtime->preconfig.struct_size = sizeof(PyPreConfig);
- PyStatus status = PyPreConfig_InitPythonConfig(&runtime->preconfig);
- if (_PyStatus_EXCEPTION(status)) {
- return status;
- }
+ PyPreConfig_InitPythonConfig(&runtime->preconfig);
runtime->gilstate.check_enabled = 1;
@@ -210,7 +206,6 @@
interp->id_refcount = -1;
interp->check_interval = 100;
- interp->config.struct_size = sizeof(PyConfig);
PyStatus status = PyConfig_InitPythonConfig(&interp->config);
if (_PyStatus_EXCEPTION(status)) {
/* Don't report status to caller: PyConfig_InitPythonConfig()