Skip to content

Commit

Permalink
nrf/main: Make mp_builtin_open signature match that in py/builtin.h.
Browse files Browse the repository at this point in the history
Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Sep 8, 2020
1 parent 4f2fe34 commit 75344af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ports/nrf/main.c
Expand Up @@ -280,10 +280,10 @@ mp_import_stat_t mp_import_stat(const char *path) {
return uos_mbfs_import_stat(path);
}

STATIC mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args) {
mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
return uos_mbfs_open(n_args, args);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_open_obj, 1, 2, mp_builtin_open);
MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);

#else
// use dummy functions - no filesystem available
Expand All @@ -295,7 +295,7 @@ mp_import_stat_t mp_import_stat(const char *path) {
return MP_IMPORT_STAT_NO_EXIST;
}

STATIC mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
mp_raise_OSError(MP_EPERM);
}
MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);
Expand Down

0 comments on commit 75344af

Please sign in to comment.