@@ -194,25 +194,18 @@ PyPreConfig
194194 * Configure the LC_CTYPE locale
195195 * Set the UTF-8 mode
196196
197- The :c:member: `struct_size ` field must be explicitly initialized to
198- ``sizeof(PyPreConfig) ``.
199-
200197 Function to initialize a preconfiguration:
201198
202- .. c :function :: PyStatus PyPreConfig_InitIsolatedConfig (PyPreConfig *preconfig)
199+ .. c :function :: void PyPreConfig_InitIsolatedConfig (PyPreConfig *preconfig)
203200
204201 Initialize the preconfiguration with :ref: `Python Configuration
205202 <init-python-config>`.
206203
207- .. c :function :: PyStatus PyPreConfig_InitPythonConfig (PyPreConfig *preconfig)
204+ .. c :function :: void PyPreConfig_InitPythonConfig (PyPreConfig *preconfig)
208205
209206 Initialize the preconfiguration with :ref: `Isolated Configuration
210207 <init-isolated-conf>`.
211208
212- The caller of these functions is responsible to handle exceptions (error or
213- exit) using :c:func:`PyStatus_Exception` and
214- :c:func:`Py_ExitStatusException`.
215-
216209 Structure fields:
217210
218211 .. c :member :: int allocator
@@ -274,13 +267,6 @@ PyPreConfig
274267 same way the regular Python parses command line arguments: see
275268 :ref: `Command Line Arguments <using-on-cmdline >`.
276269
277- .. c :member :: size_t struct_size
278-
279- Size of the structure in bytes: must be initialized to
280- ``sizeof(PyPreConfig) ``.
281-
282- Field used for API and ABI compatibility.
283-
284270 .. c :member :: int use_environment
285271
286272 See :c:member: `PyConfig.use_environment `.
@@ -332,12 +318,7 @@ Example using the preinitialization to enable the UTF-8 Mode::
332318
333319 PyStatus status;
334320 PyPreConfig preconfig;
335- preconfig.struct_size = sizeof(PyPreConfig);
336-
337- status = PyPreConfig_InitPythonConfig(&preconfig);
338- if (PyStatus_Exception(status)) {
339- Py_ExitStatusException (status);
340- }
321+ PyPreConfig_InitPythonConfig(&preconfig);
341322
342323 preconfig.utf8_mode = 1;
343324
@@ -360,9 +341,6 @@ PyConfig
360341
361342 Structure containing most parameters to configure Python.
362343
363- The :c:member: `struct_size ` field must be explicitly initialized to
364- ``sizeof(PyConfig) ``.
365-
366344 Structure methods:
367345
368346 .. c :function :: PyStatus PyConfig_InitPythonConfig (PyConfig *config)
@@ -679,13 +657,6 @@ PyConfig
679657 Encoding and encoding errors of :data:`sys.stdin`, :data:`sys.stdout` and
680658 :data:`sys.stderr`.
681659
682- .. c:member:: size_t struct_size
683-
684- Size of the structure in bytes: must be initialized to
685- ``sizeof(PyConfig)``.
686-
687- Field used for API and ABI compatibility.
688-
689660 .. c:member:: int tracemalloc
690661
691662 If non-zero, call :func:`tracemalloc.start` at startup.
@@ -754,7 +725,6 @@ Example setting the program name::
754725 {
755726 PyStatus status;
756727 PyConfig config;
757- config.struct_size = sizeof (PyConfig);
758728
759729 status = PyConfig_InitPythonConfig (&config);
760730 if (PyStatus_Exception (status)) {
@@ -787,7 +757,6 @@ configuration, and then override some parameters::
787757 {
788758 PyStatus status;
789759 PyConfig config;
790- config.struct_size = sizeof(PyConfig);
791760
792761 status = PyConfig_InitPythonConfig(&config);
793762 if (PyStatus_Exception(status)) {
@@ -875,7 +844,6 @@ Example of customized Python always running in isolated mode::
875844 {
876845 PyStatus status;
877846 PyConfig config;
878- config.struct_size = sizeof(PyConfig);
879847
880848 status = PyConfig_InitPythonConfig(&config);
881849 if (PyStatus_Exception(status)) {
@@ -1067,7 +1035,6 @@ phases::
10671035 {
10681036 PyStatus status;
10691037 PyConfig config;
1070- config.struct_size = sizeof (PyConfig);
10711038
10721039 status = PyConfig_InitPythonConfig (&config);
10731040 if (PyStatus_Exception (status)) {
0 commit comments