Skip to content

Commit 8485d2a

Browse files
committed
updated all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE
for micropython/micropython#8813
1 parent 3a0a349 commit 8485d2a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

st7789/st7789.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,14 @@ STATIC MP_DEFINE_CONST_DICT(st7789_ST7789_locals_dict, st7789_ST7789_locals_dict
510510
/* methods end */
511511

512512

513-
const mp_obj_type_t st7789_ST7789_type = {
514-
{ &mp_type_type },
515-
.name = MP_QSTR_ST7789,
516-
.print = st7789_ST7789_print,
517-
.make_new = st7789_ST7789_make_new,
518-
.locals_dict = (mp_obj_dict_t*)&st7789_ST7789_locals_dict,
519-
};
513+
MP_DEFINE_CONST_OBJ_TYPE(
514+
st7789_ST7789_type,
515+
MP_QSTR_ST7789,
516+
MP_TYPE_FLAG_NONE,
517+
print, st7789_ST7789_print,
518+
make_new, st7789_ST7789_make_new,
519+
locals_dict, (mp_obj_dict_t*)&st7789_ST7789_locals_dict
520+
);
520521

521522
mp_obj_t st7789_ST7789_make_new(const mp_obj_type_t *type,
522523
size_t n_args,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy