From 1bb15ca427994082ef63672a0b1a23da34f383bc Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 14 Feb 2016 16:21:27 +0200 Subject: [PATCH] extmod/fsusermount,vfs_fat: Nanbox cleanness. --- extmod/fsusermount.c | 4 ++-- extmod/vfs_fat.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extmod/fsusermount.c b/extmod/fsusermount.c index 4ce731d171..d86e57b4b8 100644 --- a/extmod/fsusermount.c +++ b/extmod/fsusermount.c @@ -150,7 +150,7 @@ mkfs_error: } } -STATIC mp_obj_t fatfs_mount(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t fatfs_mount(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { fatfs_mount_mkfs(n_args, pos_args, kw_args, false); return mp_const_none; } @@ -193,7 +193,7 @@ STATIC mp_obj_t fatfs_umount(mp_obj_t bdev_or_path_in) { } MP_DEFINE_CONST_FUN_OBJ_1(fsuser_umount_obj, fatfs_umount); -STATIC mp_obj_t fatfs_mkfs(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t fatfs_mkfs(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { fatfs_mount_mkfs(n_args, pos_args, kw_args, true); return mp_const_none; } diff --git a/extmod/vfs_fat.c b/extmod/vfs_fat.c index f7c31408ff..607a736a78 100644 --- a/extmod/vfs_fat.c +++ b/extmod/vfs_fat.c @@ -41,7 +41,7 @@ STATIC mp_obj_t fat_vfs_make_new(const mp_obj_type_t *type, size_t n_args, size_ mp_arg_check_num(n_args, n_kw, 2, 2, false); mp_obj_fat_vfs_t *vfs = fatfs_mount_mkfs(n_args, args, (mp_map_t*)&mp_const_empty_map, false); vfs->base.type = type; - return vfs; + return MP_OBJ_FROM_PTR(vfs); } STATIC mp_obj_t fat_vfs_mkfs(mp_obj_t bdev_in) { @@ -52,7 +52,7 @@ STATIC mp_obj_t fat_vfs_mkfs(mp_obj_t bdev_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(fat_vfs_mkfs_fun_obj, fat_vfs_mkfs); STATIC MP_DEFINE_CONST_STATICMETHOD_OBJ(fat_vfs_mkfs_obj, MP_ROM_PTR(&fat_vfs_mkfs_fun_obj)); -mp_obj_t fat_vfs_open(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { +STATIC mp_obj_t fat_vfs_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { // Skip self return fatfs_builtin_open(n_args - 1, args + 1, kwargs); }