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:
Victor Stinner 2015-04-03 13:10:54 +02:00
parent 21dfffa218
commit 13019fdef3
6 changed files with 45 additions and 5 deletions

View file

@ -101,7 +101,7 @@ lock_acquire_parse_args(PyObject *args, PyObject *kwds,
char *kwlist[] = {"blocking", "timeout", NULL};
int blocking = 1;
PyObject *timeout_obj = NULL;
const _PyTime_t unset_timeout = _PyTime_FromNanoseconds(-1000000000);
const _PyTime_t unset_timeout = _PyTime_FromSeconds(-1);
*timeout = unset_timeout ;