mirror of
https://github.com/python/cpython.git
synced 2025-07-10 04:45:36 +00:00
Issue #22043: _PyTime_Init() now checks if the system clock works.
Other changes: * The whole _PyTime API is private (not defined if Py_LIMITED_API is set) * _PyTime_gettimeofday_info() also returns -1 on error * Simplify PyTime_gettimeofday(): only use clock_gettime(CLOCK_REALTIME) or gettimeofday() on UNIX. Don't fallback to ftime() or time() anymore.
This commit is contained in:
parent
7efb83393c
commit
0011124dc2
4 changed files with 77 additions and 97 deletions
|
@ -452,7 +452,8 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
|
|||
if (_PyFaulthandler_Init())
|
||||
Py_FatalError("Py_Initialize: can't initialize faulthandler");
|
||||
|
||||
_PyTime_Init();
|
||||
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