Skip to content

Commit 789120e

Browse files
authored
gh-148790: Eliminate redundant call to _PyRuntime_Initialize in Py_InitializeEx (GH-121628)
1 parent 513db72 commit 789120e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Python/pylifecycle.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,18 +1641,12 @@ Py_InitializeFromConfig(const PyConfig *config)
16411641
void
16421642
Py_InitializeEx(int install_sigs)
16431643
{
1644-
PyStatus status;
1645-
1646-
status = _PyRuntime_Initialize();
1647-
if (_PyStatus_EXCEPTION(status)) {
1648-
Py_ExitStatusException(status);
1649-
}
1650-
16511644
if (Py_IsInitialized()) {
16521645
/* bpo-33932: Calling Py_Initialize() twice does nothing. */
16531646
return;
16541647
}
16551648

1649+
PyStatus status;
16561650
PyConfig config;
16571651
_PyConfig_InitCompatConfig(&config);
16581652

0 commit comments

Comments
 (0)