summaryrefslogtreecommitdiff
path: root/py/objzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objzip.c')
-rw-r--r--py/objzip.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/py/objzip.c b/py/objzip.c
index 81fa1d587..0ceafd97f 100644
--- a/py/objzip.c
+++ b/py/objzip.c
@@ -66,10 +66,11 @@ STATIC mp_obj_t zip_iternext(mp_obj_t self_in) {
return MP_OBJ_FROM_PTR(tuple);
}
-const mp_obj_type_t mp_type_zip = {
- { &mp_type_type },
- .name = MP_QSTR_zip,
- .make_new = zip_make_new,
- .getiter = mp_identity_getiter,
- .iternext = zip_iternext,
-};
+MP_DEFINE_CONST_OBJ_TYPE(
+ mp_type_zip,
+ MP_QSTR_zip,
+ MP_TYPE_FLAG_NONE,
+ zip_make_new,
+ getiter, mp_identity_getiter,
+ iternext, zip_iternext
+ );