summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-18 08:30:33 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-18 08:30:33 (GMT)
commit329e4925700f68c75f8a35612b0a8eae137585d6 (patch)
tree25bcce521744706c25dfd5cb56290a74510cfc29 /Modules
parent0aba4dc1ed70a3f7eccef5556fdc620b2ffd32bd (diff)
downloadcpython-329e4925700f68c75f8a35612b0a8eae137585d6.zip
cpython-329e4925700f68c75f8a35612b0a8eae137585d6.tar.gz
cpython-329e4925700f68c75f8a35612b0a8eae137585d6.tar.bz2
Issue #20656: Restore explicit downcast in select_select().
Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/selectmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index c92bd0f..ffaf865 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -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");