diff options
| author | Damien George | 2014-03-26 19:27:58 +0000 |
|---|---|---|
| committer | Damien George | 2014-03-26 19:27:58 +0000 |
| commit | 66eaf84b8c2db6afad7ec49eb296a019a2f377df (patch) | |
| tree | a05406b020ba4102ffd90fdfb5357a301b9de637 /py/objfilter.c | |
| parent | 688e220d268609ec1a5be7a9b532637fe8c1f765 (diff) | |
py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.
Diffstat (limited to 'py/objfilter.c')
| -rw-r--r-- | py/objfilter.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/py/objfilter.c b/py/objfilter.c index ea76b9907..6ba1303a3 100644 --- a/py/objfilter.c +++ b/py/objfilter.c @@ -1,3 +1,4 @@ +#include <stdlib.h> #include <assert.h> #include "nlr.h" @@ -29,7 +30,7 @@ STATIC mp_obj_t filter_iternext(mp_obj_t self_in) { assert(MP_OBJ_IS_TYPE(self_in, &filter_type)); mp_obj_filter_t *self = self_in; mp_obj_t next; - while ((next = rt_iternext(self->iter)) != mp_const_stop_iteration) { + while ((next = rt_iternext(self->iter)) != MP_OBJ_NULL) { mp_obj_t val; if (self->fun != mp_const_none) { val = rt_call_function_n_kw(self->fun, 1, 0, &next); @@ -40,7 +41,7 @@ STATIC mp_obj_t filter_iternext(mp_obj_t self_in) { return next; } } - return mp_const_stop_iteration; + return MP_OBJ_NULL; } const mp_obj_type_t filter_type = { |
