From c4a8004933d1ae4da52f175d456d6fbe765c3923 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 12 Aug 2016 22:06:47 +0300 Subject: py: Get rid of assert() in method argument checking functions. Checks for number of args removes where guaranteed by function descriptor, self checking is replaced with mp_check_self(). In few cases, exception is raised instead of assert. --- py/objzip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/objzip.c') diff --git a/py/objzip.c b/py/objzip.c index d4cd614a4c..6edefc3611 100644 --- a/py/objzip.c +++ b/py/objzip.c @@ -49,7 +49,7 @@ STATIC mp_obj_t zip_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_ } STATIC mp_obj_t zip_iternext(mp_obj_t self_in) { - assert(MP_OBJ_IS_TYPE(self_in, &mp_type_zip)); + mp_check_self(MP_OBJ_IS_TYPE(self_in, &mp_type_zip)); mp_obj_zip_t *self = MP_OBJ_TO_PTR(self_in); if (self->n_iters == 0) { return MP_OBJ_STOP_ITERATION; -- cgit v1.2.3