[Python-checkins] cpython: Issue #20656: Restore explicit downcast in select_select().

victor.stinner python-checkins at python.org
Tue Feb 18 09:30:45 CET 2014


http://hg.python.org/cpython/rev/6c186975ee43
changeset: 89247:6c186975ee43
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Feb 18 09:30:33 2014 +0100
summary:
 Issue #20656: Restore explicit downcast in select_select().
Cast from time_t (64 bit) to long (32 bit). It should fix a compiler warning.
files:
 Modules/selectmodule.c | 3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -232,10 +232,11 @@
 return NULL;
 }
 #endif
+ tv.tv_sec = (long)sec;
 #else
 assert(sizeof(tv.tv_sec) >= sizeof(sec));
+ tv.tv_sec = sec;
 #endif
- tv.tv_sec = sec;
 tv.tv_usec = usec;
 if (tv.tv_sec < 0) {
 PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /