aboutsummaryrefslogtreecommitdiff
path: root/py/objzip.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-11 18:37:21 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-11 18:37:21 +0100
commitee7a880d6e669423309c3a5f8c20b59027604572 (patch)
treed3b2f09d32316e60a77672c0650e32a81f2ee2d1 /py/objzip.c
parent1d34e324319c3b9c22ea045d1fbe526bc05a48b4 (diff)
py: Use mp_arg_check_num in more places.
Updated functions now do proper checking that n_kw==0, and are simpler because they don't have to explicitly raise an exception. Down side is that the error messages no longer include the function name, but that's acceptable. Saves order 300 text bytes on x64 and ARM.
Diffstat (limited to 'py/objzip.c')
-rw-r--r--py/objzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objzip.c b/py/objzip.c
index 8f8946264..97a14eb87 100644
--- a/py/objzip.c
+++ b/py/objzip.c
@@ -40,7 +40,7 @@ typedef struct _mp_obj_zip_t {
} mp_obj_zip_t;
STATIC mp_obj_t zip_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) {
- // TODO check n_kw == 0
+ mp_arg_check_num(n_args, n_kw, 0, MP_OBJ_FUN_ARGS_MAX, false);
mp_obj_zip_t *o = m_new_obj_var(mp_obj_zip_t, mp_obj_t, n_args);
o->base.type = &mp_type_zip;