mirror of
https://github.com/python/cpython.git
synced 2026-04-24 12:50:47 +00:00
bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845)
Calling Py_Initialize() twice does nothing, instead of failing with a
fatal error: restore the Python 3.6 behaviour.
(cherry picked from commit 209abf7469)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
This commit is contained in:
parent
235d0fb93c
commit
b940921a67
4 changed files with 30 additions and 0 deletions
|
|
@ -895,6 +895,11 @@ _Py_InitializeMainInterpreter(const _PyMainInterpreterConfig *config)
|
|||
_PyInitError
|
||||
_Py_InitializeEx_Private(int install_sigs, int install_importlib)
|
||||
{
|
||||
if (_PyRuntime.initialized) {
|
||||
/* bpo-33932: Calling Py_Initialize() twice does nothing. */
|
||||
return _Py_INIT_OK();
|
||||
}
|
||||
|
||||
_PyCoreConfig config = _PyCoreConfig_INIT;
|
||||
_PyInitError err;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue