mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Issue #22117: Add a new _PyTime_FromSeconds() function
Fix also _Py_InitializeEx_Private(): initialize time before initializing import, import_init() uses the _PyTime API (for thread locks).
This commit is contained in:
parent
21dfffa218
commit
13019fdef3
6 changed files with 45 additions and 5 deletions
|
@ -405,15 +405,15 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
|
|||
if (!install_importlib)
|
||||
return;
|
||||
|
||||
if (_PyTime_Init() < 0)
|
||||
Py_FatalError("Py_Initialize: can't initialize time");
|
||||
|
||||
import_init(interp, sysmod);
|
||||
|
||||
/* initialize the faulthandler module */
|
||||
if (_PyFaulthandler_Init())
|
||||
Py_FatalError("Py_Initialize: can't initialize faulthandler");
|
||||
|
||||
if (_PyTime_Init() < 0)
|
||||
Py_FatalError("Py_Initialize: can't initialize time");
|
||||
|
||||
if (initfsencoding(interp) < 0)
|
||||
Py_FatalError("Py_Initialize: unable to load the file system codec");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue