mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
bpo-44113: Update fromzenmain not to use Py_SetProgramName (GH-26085)
This commit is contained in:
parent
ec7c09b9bc
commit
7565586724
@ -78,8 +78,14 @@ Py_FrozenMain(int argc, char **argv)
|
||||
#ifdef MS_WINDOWS
|
||||
PyInitFrozenExtensions();
|
||||
#endif /* MS_WINDOWS */
|
||||
if (argc >= 1)
|
||||
Py_SetProgramName(argv_copy[0]);
|
||||
if (argc >= 1) {
|
||||
status = PyConfig_SetString(&config, &config.program_name,
|
||||
argv_copy[0]);
|
||||
if (PyStatus_Exception(status)) {
|
||||
PyConfig_Clear(&config);
|
||||
Py_ExitStatusException(status);
|
||||
}
|
||||
}
|
||||
|
||||
status = Py_InitializeFromConfig(&config);
|
||||
PyConfig_Clear(&config);
|
||||
|
Loading…
Reference in New Issue
Block a user