summaryrefslogtreecommitdiff
path: root/extmod/vfs_fat_file.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-02-23 17:33:26 +1100
committerDamien George <damien.p.george@gmail.com>2018-02-23 17:33:26 +1100
commiteb570f47a2ec48285fcfab5643301862fa4fe544 (patch)
treea034fec59603e7d231a607414ab30639620e3ad2 /extmod/vfs_fat_file.c
parent638b860066ddf6a684ce2d573917b3c8a5817ba2 (diff)
extmod/vfs_fat: Make fat_vfs_open_obj wrapper public, not its function.
This patch just moves the definition of the wrapper object fat_vfs_open_obj to the location of the definition of its function, which matches how it's done in most other places in the code base.
Diffstat (limited to 'extmod/vfs_fat_file.c')
-rw-r--r--extmod/vfs_fat_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c
index 6154c8483..23e5aa10f 100644
--- a/extmod/vfs_fat_file.c
+++ b/extmod/vfs_fat_file.c
@@ -282,7 +282,7 @@ const mp_obj_type_t mp_type_textio = {
};
// Factory function for I/O stream classes
-mp_obj_t fatfs_builtin_open_self(mp_obj_t self_in, mp_obj_t path, mp_obj_t mode) {
+STATIC mp_obj_t fatfs_builtin_open_self(mp_obj_t self_in, mp_obj_t path, mp_obj_t mode) {
// TODO: analyze buffering args and instantiate appropriate type
fs_user_mount_t *self = MP_OBJ_TO_PTR(self_in);
mp_arg_val_t arg_vals[FILE_OPEN_NUM_ARGS];
@@ -291,5 +291,6 @@ mp_obj_t fatfs_builtin_open_self(mp_obj_t self_in, mp_obj_t path, mp_obj_t mode)
arg_vals[2].u_obj = mp_const_none;
return file_open(self, &mp_type_textio, arg_vals);
}
+MP_DEFINE_CONST_FUN_OBJ_3(fat_vfs_open_obj, fatfs_builtin_open_self);
#endif // MICROPY_VFS && MICROPY_VFS_FAT