diff options
author | stijn <stinos@zoho.com> | 2014-10-04 08:51:33 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-21 22:10:01 +0300 |
commit | 2fe4cf7761ffc40d81b4780d59c2b6ef0a5c16ff (patch) | |
tree | a959cd20a8f4458861a3589f9d179225609ffc19 /qemu-arm/test_main.c | |
parent | 072bd07f178998f2c88cd2ceef86dea7902a1764 (diff) |
Implement kwargs for builtin open() and _io.FileIO
This makes open() and _io.FileIO() more CPython compliant.
The mode kwarg is fully iplemented.
The encoding kwarg is allowed but not implemented; mainly to allow
the tests to specify encoding for CPython, see #874
Diffstat (limited to 'qemu-arm/test_main.c')
-rw-r--r-- | qemu-arm/test_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-arm/test_main.c b/qemu-arm/test_main.c index 099cd94ba..fb9513077 100644 --- a/qemu-arm/test_main.c +++ b/qemu-arm/test_main.c @@ -78,10 +78,10 @@ mp_import_stat_t mp_import_stat(const char *path) { return MP_IMPORT_STAT_NO_EXIST; } -mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args) { +mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args, mp_map_t *kwargs) { return mp_const_none; } -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); void nlr_jump_fail(void *val) { } |