[Python-checkins] cpython: Issue #14180: Fix select.select() compilation on BSD and a typo in

victor.stinner python-checkins at python.org
Tue Mar 13 15:30:59 CET 2012


http://hg.python.org/cpython/rev/1eaf6e899f02
changeset: 75592:1eaf6e899f02
user: Victor Stinner <vstinner at wyplay.com>
date: Tue Mar 13 15:29:08 2012 +0100
summary:
 Issue #14180: Fix select.select() compilation on BSD and a typo in kqueue_queue_control()
files:
 Modules/selectmodule.c | 6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -223,8 +223,10 @@
 return NULL;
 }
 else {
- if (_PyTime_ObjectToTimeval(tout, &tv.tv_sec, &tv.tv_usec) == -1)
+ long usec;
+ if (_PyTime_ObjectToTimeval(tout, &tv.tv_sec, &usec) == -1)
 return NULL;
+ tv.tv_usec = usec;
 if (tv.tv_sec < 0) {
 PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
 return NULL;
@@ -1837,7 +1839,7 @@
 PyObject *result = NULL;
 struct kevent *evl = NULL;
 struct kevent *chl = NULL;
- struct timespec timeoutspec;
+ struct timespec timeout;
 struct timespec *ptimeoutspec;
 
 if (self->kqfd < 0)
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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