summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/moduzlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/moduzlib.c')
-rw-r--r--extmod/moduzlib.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c
index 0161b9f49c..93c939129e 100644
--- a/extmod/moduzlib.c
+++ b/extmod/moduzlib.c
@@ -140,13 +140,14 @@ STATIC const mp_stream_p_t decompio_stream_p = {
};
#if !MICROPY_ENABLE_DYNRUNTIME
-STATIC const mp_obj_type_t decompio_type = {
- { &mp_type_type },
- .name = MP_QSTR_DecompIO,
- .make_new = decompio_make_new,
- .protocol = &decompio_stream_p,
- .locals_dict = (void *)&decompio_locals_dict,
-};
+STATIC MP_DEFINE_CONST_OBJ_TYPE(
+ decompio_type,
+ MP_QSTR_DecompIO,
+ MP_TYPE_FLAG_NONE,
+ decompio_make_new,
+ protocol, &decompio_stream_p,
+ locals_dict, (void *)&decompio_locals_dict
+ );
#endif
STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {