FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Issue #14180: Fix select.select() compilation on BSD and a typo in kq… · python/cpython@d327f9d · GitHub

Repository navigation

Commit d327f9d

Browse files
committed
Issue #14180: Fix select.select() compilation on BSD and a typo in kqueue_queue_control()
1 parent 3a31dd4 commit d327f9d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎Modules/selectmodule.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ select_select(PyObject *self, PyObject *args)
223223
return NULL;
224224
}
225225
else {
226-
if (_PyTime_ObjectToTimeval(tout, &tv.tv_sec, &tv.tv_usec) == -1)
226+
long usec;
227+
if (_PyTime_ObjectToTimeval(tout, &tv.tv_sec, &usec) == -1)
227228
return NULL;
229+
tv.tv_usec = usec;
228230
if (tv.tv_sec < 0) {
229231
PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
230232
return NULL;
@@ -1837,7 +1839,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
18371839
PyObject *result = NULL;
18381840
struct kevent *evl = NULL;
18391841
struct kevent *chl = NULL;
1840-
struct timespec timeoutspec;
1842+
struct timespec timeout;
18411843
struct timespec *ptimeoutspec;
18421844

18431845
if (self->kqfd < 0)

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL