diff options
| author | Damien George <damien@micropython.org> | 2023-08-02 10:04:13 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-08-07 12:37:47 +1000 |
| commit | 3f417e894309ee769b80aea85e9a45a826482c64 (patch) | |
| tree | 3c752d0504605abe90e84eac8f62922d8e474c2a | |
| parent | ef71028f77e4a6fc449c64906ebad0a160f35240 (diff) | |
extmod/modselect: Remove undocumented support for flags arg to poll.
The signature of this method was poller.poll(timeout=-1, flags=0, /) but
the flags argument was not documented and is not CPython compatible. So
it's removed in this commit.
(The optional flags remains for the ipoll() method, which is documented.)
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | extmod/modselect.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/extmod/modselect.c b/extmod/modselect.c index 01b1474d7..7c65e7dca 100644 --- a/extmod/modselect.c +++ b/extmod/modselect.c @@ -58,7 +58,7 @@ #endif -// Flags for poll() +// Flags for ipoll() #define FLAG_ONESHOT (1) // A single pollable object. @@ -524,15 +524,11 @@ STATIC mp_obj_t poll_poll(size_t n_args, const mp_obj_t *args) { if (poll_obj_get_revents(poll_obj) != 0) { mp_obj_t tuple[2] = {poll_obj->obj, MP_OBJ_NEW_SMALL_INT(poll_obj_get_revents(poll_obj))}; ret_list->items[n_ready++] = mp_obj_new_tuple(2, tuple); - if (self->flags & FLAG_ONESHOT) { - // Don't poll next time, until new event mask will be set explicitly - poll_obj_set_events(poll_obj, 0); - } } } return MP_OBJ_FROM_PTR(ret_list); } -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(poll_poll_obj, 1, 3, poll_poll); +MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(poll_poll_obj, 1, 2, poll_poll); STATIC mp_obj_t poll_ipoll(size_t n_args, const mp_obj_t *args) { mp_obj_poll_t *self = MP_OBJ_TO_PTR(args[0]); |
