diff options
author | Damien George <damien.p.george@gmail.com> | 2019-12-16 15:40:05 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-12-27 22:51:17 +1100 |
commit | 09376f0e47b3ab4a5a2a3c2c768ff913e1835cc8 (patch) | |
tree | 4fd6399e318c977b3ddd20c13659f176b70f3f5b /extmod/vfs_posix_file.c | |
parent | f5eec903fa961135296e2656821450979e413248 (diff) |
py: Introduce MP_ROM_NONE macro for ROM to refer to None object.
This helps to prevent mistakes, and allows easily changing the ROM value of
None if needed.
Diffstat (limited to 'extmod/vfs_posix_file.c')
-rw-r--r-- | extmod/vfs_posix_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c index 30fde818e..87c202e3b 100644 --- a/extmod/vfs_posix_file.c +++ b/extmod/vfs_posix_file.c @@ -110,7 +110,7 @@ mp_obj_t mp_vfs_posix_file_open(const mp_obj_type_t *type, mp_obj_t file_in, mp_ STATIC mp_obj_t vfs_posix_file_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { static const mp_arg_t allowed_args[] = { - { MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_rom_obj = MP_ROM_PTR(&mp_const_none_obj)} }, + { MP_QSTR_file, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_rom_obj = MP_ROM_NONE} }, { MP_QSTR_mode, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_QSTR(MP_QSTR_r)} }, }; |