nrf/main: Make mp_builtin_open signature match that in py/builtin.h.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2020-09-08 13:52:13 +10:00
parent 4f2fe34623
commit 75344af4ca
1 changed files with 3 additions and 3 deletions

View File

@ -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
@ -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);