@@ -343,12 +343,12 @@ PyConfig
343343
344344 Structure methods:
345345
346- .. c :function :: PyStatus PyConfig_InitPythonConfig (PyConfig *config)
346+ .. c :function :: void PyConfig_InitPythonConfig (PyConfig *config)
347347
348348 Initialize configuration with :ref: `Python Configuration
349349 <init-python-config>`.
350350
351- .. c :function :: PyStatus PyConfig_InitIsolatedConfig (PyConfig *config)
351+ .. c :function :: void PyConfig_InitIsolatedConfig (PyConfig *config)
352352
353353 Initialize configuration with :ref: `Isolated Configuration
354354 <init-isolated-conf>`.
@@ -724,12 +724,9 @@ Example setting the program name::
724724 void init_python(void)
725725 {
726726 PyStatus status;
727- PyConfig config;
728727
729- status = PyConfig_InitPythonConfig (&config);
730- if (PyStatus_Exception (status)) {
731- goto fail;
732- }
728+ PyConfig config;
729+ PyConfig_InitPythonConfig (&config);
733730
734731 /* Set the program name. Implicitly preinitialize Python. */
735732 status = PyConfig_SetString(&config, &config.program_name,
@@ -756,12 +753,9 @@ configuration, and then override some parameters::
756753 PyStatus init_python(const char *program_name)
757754 {
758755 PyStatus status;
759- PyConfig config;
760756
761- status = PyConfig_InitPythonConfig(&config);
762- if (PyStatus_Exception(status)) {
763- goto done;
764- }
757+ PyConfig config;
758+ PyConfig_InitPythonConfig(&config);
765759
766760 /* Set the program name before reading the configuraton
767761 (decode byte string from the locale encoding).
@@ -843,13 +837,9 @@ Example of customized Python always running in isolated mode::
843837 int main(int argc, char **argv)
844838 {
845839 PyStatus status;
846- PyConfig config;
847-
848- status = PyConfig_InitPythonConfig(&config);
849- if (PyStatus_Exception(status)) {
850- goto fail;
851- }
852840
841+ PyConfig config;
842+ PyConfig_InitPythonConfig(&config);
853843 config.isolated = 1 ;
854844
855845 /* Decode command line arguments.
@@ -1034,14 +1024,9 @@ phases::
10341024 void init_python(void)
10351025 {
10361026 PyStatus status;
1037- PyConfig config;
1038-
1039- status = PyConfig_InitPythonConfig (&config);
1040- if (PyStatus_Exception (status)) {
1041- PyConfig_Clear (&config);
1042- Py_ExitStatusException (status);
1043- }
10441027
1028+ PyConfig config;
1029+ PyConfig_InitPythonConfig (&config);
10451030 config._init_main = 0;
10461031
10471032 /* ... customize 'config' configuration ... */
0 commit comments