diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-18 18:19:24 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-06-18 18:44:57 +0300 |
commit | 07209f8592f15435d6abbccaad5347cea2c7722e (patch) | |
tree | a009978926973dc9bb1365872f4313435df57259 /stmhal/moduselect.c | |
parent | 080137961daef9a1b0fe1f37f54a820842728442 (diff) |
all: Rename mp_obj_type_t::stream_p to protocol.
It's now used for more than just stream protocol (e.g. pin protocol), so
don't use false names.
Diffstat (limited to 'stmhal/moduselect.c')
-rw-r--r-- | stmhal/moduselect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/stmhal/moduselect.c b/stmhal/moduselect.c index e87478ae6..92e77e6ca 100644 --- a/stmhal/moduselect.c +++ b/stmhal/moduselect.c @@ -53,12 +53,13 @@ STATIC void poll_map_add(mp_map_t *poll_map, const mp_obj_t *obj, mp_uint_t obj_ if (elem->value == NULL) { // object not found; get its ioctl and add it to the poll list mp_obj_type_t *type = mp_obj_get_type(obj[i]); - if (type->stream_p == NULL || type->stream_p->ioctl == NULL) { + const mp_stream_p_t *stream_p = type->protocol; + if (stream_p == NULL || stream_p->ioctl == NULL) { nlr_raise(mp_obj_new_exception_msg(&mp_type_TypeError, "object with stream.ioctl required")); } poll_obj_t *poll_obj = m_new_obj(poll_obj_t); poll_obj->obj = obj[i]; - poll_obj->ioctl = type->stream_p->ioctl; + poll_obj->ioctl = stream_p->ioctl; poll_obj->flags = flags; poll_obj->flags_ret = 0; elem->value = poll_obj; |