8000 Fix modrtch to use MP_DEFINE_CONST_OBJ_TYPE · basvd/lv_binding_micropython@019c3e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 019c3e0

Browse files
committed
Fix modrtch to use MP_DEFINE_CONST_OBJ_TYPE
1 parent d41ed4a commit 019c3e0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

driver/esp32/modrtch.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,14 @@ STATIC const mp_rom_map_elem_t rtch_locals_dict_table[] = {
148148

149149
STATIC MP_DEFINE_CONST_DICT(rtch_locals_dict, rtch_locals_dict_table);
150150

151-
STATIC const mp_obj_type_t rtch_type = {
152-
{ &mp_type_type },
153-
.name = MP_QSTR_rtch,
154-
//.print = rtch_print,
155-
.make_new = rtch_make_new,
156-
.locals_dict = (mp_obj_dict_t*)&rtch_locals_dict,
157-
};
151+
STATIC MP_DEFINE_CONST_OBJ_TYPE(
152+
rtch_type,
153+
MP_QSTR_rtch,
154+
MP_TYPE_FLAG_NONE,
155+
//print, rtch_print,
156+
make_new, rtch_make_new,
157+
locals_dict, (mp_obj_dict_t*)&rtch_locals_dict
158+
);
158159

159160
STATIC const mp_rom_map_elem_t rtch_globals_table[] = {
160161
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rtch) },

0 commit comments

Comments
 (0)
0