From a3f94e0030dc209f4d180531878cede7a1e2dbbe Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 20 Apr 2014 00:13:22 +0100 Subject: py: Add arg checking helper functions. These are to assist in writing native C functions that take positional and keyword arguments. mp_arg_check_num is for just checking the number of arguments is correct. mp_arg_parse_all is for parsing positional and keyword arguments with default values. --- py/objrange.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objrange.c') diff --git a/py/objrange.c b/py/objrange.c index 7815a5951..8c0eadd32 100644 --- a/py/objrange.c +++ b/py/objrange.c @@ -57,7 +57,7 @@ typedef struct _mp_obj_range_t { } mp_obj_range_t; STATIC mp_obj_t range_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_obj_t *args) { - mp_check_nargs(n_args, 1, 3, n_kw, false); + mp_arg_check_num(n_args, n_kw, 1, 3, false); mp_obj_range_t *o = m_new_obj(mp_obj_range_t); o->base.type = &mp_type_range; -- cgit v1.2.3