Commit 329e4925 authored by Victor Stinner's avatar Victor Stinner

Issue #20656: Restore explicit downcast in select_select().

Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
parent 0aba4dc1
......@@ -232,10 +232,11 @@ select_select(PyObject *self, PyObject *args)
return NULL;
}
#endif
tv.tv_sec = (long)sec;
#else
assert(sizeof(tv.tv_sec) >= sizeof(sec));
#endif
tv.tv_sec = sec;
#endif
tv.tv_usec = usec;
if (tv.tv_sec < 0) {
PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment