summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/moduselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/moduselect.c')
-rw-r--r--extmod/moduselect.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/extmod/moduselect.c b/extmod/moduselect.c
index 70a1de2e40..1a11ee0eab 100644
--- a/extmod/moduselect.c
+++ b/extmod/moduselect.c
@@ -336,13 +336,15 @@ STATIC const mp_rom_map_elem_t poll_locals_dict_table[] = {
};
STATIC MP_DEFINE_CONST_DICT(poll_locals_dict, poll_locals_dict_table);
-STATIC const mp_obj_type_t mp_type_poll = {
- { &mp_type_type },
- .name = MP_QSTR_poll,
- .getiter = mp_identity_getiter,
- .iternext = poll_iternext,
- .locals_dict = (void *)&poll_locals_dict,
-};
+STATIC MP_DEFINE_CONST_OBJ_TYPE(
+ mp_type_poll,
+ MP_QSTR_poll,
+ MP_TYPE_FLAG_NONE,
+ MP_TYPE_NULL_MAKE_NEW,
+ getiter, mp_identity_getiter,
+ iternext, poll_iternext,
+ locals_dict, (void *)&poll_locals_dict
+ );
// poll()
STATIC mp_obj_t select_poll(void) {