diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-06 16:52:35 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-06 16:52:35 +0000 |
commit | c53b408f28942bfc5b64fee86ac89a339dc06e3f (patch) | |
tree | 9d3710b79da47b0b9d664f6e6c453cac39798579 /py/objstr.c | |
parent | 491cbd6a7cd0a212e28c548789db432b4e64327e (diff) | |
parent | b473d0ae86402c07cf0a72edebdfccfae7646d32 (diff) |
Merge branch 'master' of https://github.com/micropython/micropython
Conflicts:
py/argcheck.c
py/objenumerate.c
py/runtime.h
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/py/objstr.c b/py/objstr.c index 52520139a..f2f8063d0 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -108,6 +108,12 @@ STATIC void str_print(void (*print)(void *env, const char *fmt, ...), void *env, } STATIC mp_obj_t str_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) { +#if MICROPY_CPYTHON_COMPAT + if (n_kw != 0) { + mp_arg_error_unimpl_kw(); + } +#endif + switch (n_args) { case 0: return MP_OBJ_NEW_QSTR(MP_QSTR_); @@ -146,6 +152,12 @@ STATIC mp_obj_t bytes_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const m return mp_const_empty_bytes; } +#if MICROPY_CPYTHON_COMPAT + if (n_kw != 0) { + mp_arg_error_unimpl_kw(); + } +#endif + if (MP_OBJ_IS_STR(args[0])) { if (n_args < 2 || n_args > 3) { goto wrong_args; |