Commit fe866d99 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

unix/moduselect: Properly implement ipoll object iteration.

TODO: There's another issue to care about: poll set being modified during
parent 3ab6aa3a
......@@ -253,8 +253,9 @@ STATIC mp_obj_t poll_iternext(mp_obj_t self_in) {
struct pollfd *entries = self->entries;
struct pollfd *entries = self->entries + self->iter_idx;
for (int i = self->iter_idx; i < self->len; i++, entries++) {
if (entries->revents != 0) {
mp_obj_tuple_t *t = MP_OBJ_TO_PTR(self->ret_tuple);
// If there's an object stored, return it, otherwise raw fd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment