mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Issue #20656: Restore explicit downcast in select_select().
Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
This commit is contained in:
parent
0aba4dc1ed
commit
329e492570
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue