diff options
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c index fdc7e0d..ef6c66a 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -53,13 +53,20 @@ pymain_init(const _PyArgv *args) #endif PyPreConfig preconfig; - PyPreConfig_InitPythonConfig(&preconfig); + preconfig.struct_size = sizeof(PyPreConfig); + + status = PyPreConfig_InitPythonConfig(&preconfig); + if (_PyStatus_EXCEPTION(status)) { + return status; + } + status = _Py_PreInitializeFromPyArgv(&preconfig, args); if (_PyStatus_EXCEPTION(status)) { return status; } PyConfig config; + config.struct_size = sizeof(PyConfig); status = PyConfig_InitPythonConfig(&config); if (_PyStatus_EXCEPTION(status)) { goto done; |