diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 |
| commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
| tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Python/frozenmain.c | |
| parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Python/frozenmain.c')
| -rw-r--r-- | contrib/tools/python3/src/Python/frozenmain.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/tools/python3/src/Python/frozenmain.c b/contrib/tools/python3/src/Python/frozenmain.c index 738f72a9cbf..dd04d609d24 100644 --- a/contrib/tools/python3/src/Python/frozenmain.c +++ b/contrib/tools/python3/src/Python/frozenmain.c @@ -2,7 +2,7 @@ /* Python interpreter main program for frozen scripts */ #include "Python.h" -#include "pycore_runtime.h" // _PyRuntime_Initialize() +#include "pycore_runtime.h" // _PyRuntime_Initialize() #include <locale.h> #ifdef MS_WINDOWS @@ -16,9 +16,9 @@ extern int PyInitFrozenExtensions(void); int Py_FrozenMain(int argc, char **argv) { - PyStatus status = _PyRuntime_Initialize(); - if (PyStatus_Exception(status)) { - Py_ExitStatusException(status); + PyStatus status = _PyRuntime_Initialize(); + if (PyStatus_Exception(status)) { + Py_ExitStatusException(status); } const char *p; @@ -39,9 +39,9 @@ Py_FrozenMain(int argc, char **argv) } } - PyConfig config; - PyConfig_InitPythonConfig(&config); - config.pathconfig_warnings = 0; /* Suppress errors from getpath.c */ + PyConfig config; + PyConfig_InitPythonConfig(&config); + config.pathconfig_warnings = 0; /* Suppress errors from getpath.c */ if ((p = Py_GETENV("PYTHONINSPECT")) && *p != '\0') inspect = 1; @@ -80,13 +80,13 @@ Py_FrozenMain(int argc, char **argv) #endif /* MS_WINDOWS */ if (argc >= 1) Py_SetProgramName(argv_copy[0]); - - status = Py_InitializeFromConfig(&config); - PyConfig_Clear(&config); - if (PyStatus_Exception(status)) { - Py_ExitStatusException(status); - } - + + status = Py_InitializeFromConfig(&config); + PyConfig_Clear(&config); + if (PyStatus_Exception(status)) { + Py_ExitStatusException(status); + } + #ifdef MS_WINDOWS PyWinFreeze_ExeInit(); #endif @@ -99,7 +99,7 @@ Py_FrozenMain(int argc, char **argv) n = PyImport_ImportFrozenModule("__main__"); if (n == 0) - Py_FatalError("the __main__ module is not frozen"); + Py_FatalError("the __main__ module is not frozen"); if (n < 0) { PyErr_Print(); sts = 1; |
