summaryrefslogtreecommitdiff
path: root/extmod/vfs_lfsx.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/vfs_lfsx.c')
-rw-r--r--extmod/vfs_lfsx.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/extmod/vfs_lfsx.c b/extmod/vfs_lfsx.c
index fbfeaa5cc..72c669610 100644
--- a/extmod/vfs_lfsx.c
+++ b/extmod/vfs_lfsx.c
@@ -502,14 +502,15 @@ STATIC const mp_vfs_proto_t MP_VFS_LFSx(proto) = {
.import_stat = MP_VFS_LFSx(import_stat),
};
-const mp_obj_type_t MP_TYPE_VFS_LFSx = {
- { &mp_type_type },
+MP_DEFINE_CONST_OBJ_TYPE(
+ MP_TYPE_VFS_LFSx,
#if LFS_BUILD_VERSION == 1
- .name = MP_QSTR_VfsLfs1,
+ MP_QSTR_VfsLfs1,
#else
- .name = MP_QSTR_VfsLfs2,
+ MP_QSTR_VfsLfs2,
#endif
- .make_new = MP_VFS_LFSx(make_new),
- .protocol = &MP_VFS_LFSx(proto),
- .locals_dict = (mp_obj_dict_t *)&MP_VFS_LFSx(locals_dict),
-};
+ MP_TYPE_FLAG_NONE,
+ MP_VFS_LFSx(make_new),
+ protocol, &MP_VFS_LFSx(proto),
+ locals_dict, (mp_obj_dict_t *)&MP_VFS_LFSx(locals_dict)
+ );