PyPreConfig_InitPythonConfig(&preconfig);
status = Py_PreInitializeFromArgs(&preconfig, argc, argv);
if (PyStatus_Exception(status)) {
- goto fail;
+ goto fail_without_config;
}
status = PyConfig_InitPythonConfig(&config);
if (PyStatus_Exception(status)) {
- goto fail;
+ goto fail_without_config;
}
status = PyConfig_SetArgv(&config, argc, argv);
fail:
PyConfig_Clear(&config);
+fail_without_config:
if (PyStatus_IsExit(status)) {
return status.exitcode;
}