projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0aba4dc
)
Issue #20656: Restore explicit downcast in select_select().
author
Victor Stinner
<victor.stinner@gmail.com>
Tue, 18 Feb 2014 08:30:33 +0000
(09:30 +0100)
committer
Victor Stinner
<victor.stinner@gmail.com>
Tue, 18 Feb 2014 08:30:33 +0000
(09:30 +0100)
Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
Modules/selectmodule.c
patch
|
blob
|
history
diff --git
a/Modules/selectmodule.c
b/Modules/selectmodule.c
index c92bd0f806f884e9a1ab271a188ce117ca2c19d9..ffaf865df2b750061edc94d85d7fb0e356e52dfc 100644
(file)
--- 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");