diff options
author | Damien George <damien.p.george@gmail.com> | 2018-06-06 12:00:23 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-06-06 14:28:23 +1000 |
commit | f35aae366c4fd54a166960f830b4f93608d847cb (patch) | |
tree | 3ab48acc719329c066096fe648cb837e123887f5 /extmod/vfs_fat_file.c | |
parent | 172c23fe5d2efd464433c1d80304b8f3d54e7961 (diff) |
extmod/vfs_fat: Rename FileIO/TextIO types to mp_type_vfs_fat_XXX.
So they don't clash with other VFS implementations.
Diffstat (limited to 'extmod/vfs_fat_file.c')
-rw-r--r-- | extmod/vfs_fat_file.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index cbd013f16..f7b9331b8 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -35,12 +35,6 @@ #include "lib/oofatfs/ff.h" #include "extmod/vfs_fat.h" -#define mp_type_fileio fatfs_type_fileio -#define mp_type_textio fatfs_type_textio - -extern const mp_obj_type_t mp_type_fileio; -extern const mp_obj_type_t mp_type_textio; - // this table converts from FRESULT to POSIX errno const byte fresult_to_errno_table[20] = { [FR_OK] = 0, @@ -189,11 +183,11 @@ STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_ar break; #if MICROPY_PY_IO_FILEIO case 'b': - type = &mp_type_fileio; + type = &mp_type_vfs_fat_fileio; break; #endif case 't': - type = &mp_type_textio; + type = &mp_type_vfs_fat_textio; break; } } @@ -249,7 +243,7 @@ STATIC const mp_stream_p_t fileio_stream_p = { .ioctl = file_obj_ioctl, }; -const mp_obj_type_t mp_type_fileio = { +const mp_obj_type_t mp_type_vfs_fat_fileio = { { &mp_type_type }, .name = MP_QSTR_FileIO, .print = file_obj_print, @@ -268,7 +262,7 @@ STATIC const mp_stream_p_t textio_stream_p = { .is_text = true, }; -const mp_obj_type_t mp_type_textio = { +const mp_obj_type_t mp_type_vfs_fat_textio = { { &mp_type_type }, .name = MP_QSTR_TextIOWrapper, .print = file_obj_print, @@ -287,7 +281,7 @@ STATIC mp_obj_t fatfs_builtin_open_self(mp_obj_t self_in, mp_obj_t path, mp_obj_ arg_vals[0].u_obj = path; arg_vals[1].u_obj = mode; arg_vals[2].u_obj = mp_const_none; - return file_open(self, &mp_type_textio, arg_vals); + return file_open(self, &mp_type_vfs_fat_textio, arg_vals); } MP_DEFINE_CONST_FUN_OBJ_3(fat_vfs_open_obj, fatfs_builtin_open_self); |