aboutsummaryrefslogtreecommitdiff
path: root/py/objfilter.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-12 22:06:47 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-12 22:39:03 +0300
commitc4a8004933d1ae4da52f175d456d6fbe765c3923 (patch)
tree30aaeaf5a73c599a043ada8119fa3b8209837f9f /py/objfilter.c
parent83e0ebabb4c3c9144027609876ec62d428f8bba8 (diff)
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.
Diffstat (limited to 'py/objfilter.c')
-rw-r--r--py/objfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objfilter.c b/py/objfilter.c
index e288102d3..a5c85b2ce 100644
--- a/py/objfilter.c
+++ b/py/objfilter.c
@@ -44,7 +44,7 @@ STATIC mp_obj_t filter_make_new(const mp_obj_type_t *type, size_t n_args, size_t
}
STATIC mp_obj_t filter_iternext(mp_obj_t self_in) {
- assert(MP_OBJ_IS_TYPE(self_in, &mp_type_filter));
+ mp_check_self(MP_OBJ_IS_TYPE(self_in, &mp_type_filter));
mp_obj_filter_t *self = MP_OBJ_TO_PTR(self_in);
mp_obj_t next;
while ((next = mp_iternext(self->iter)) != MP_OBJ_STOP_ITERATION) {