py: Use MP_OBJ_NULL instead of NULL when appropriate.
diff --git a/py/map.c b/py/map.c
index 6864513..087f320 100644
--- a/py/map.c
+++ b/py/map.c
@@ -306,7 +306,7 @@
if (lookup_kind & MP_MAP_LOOKUP_ADD_IF_NOT_FOUND) {
mp_set_rehash(set);
} else {
- return NULL;
+ return MP_OBJ_NULL;
}
}
mp_uint_t hash = MP_OBJ_SMALL_INT_VALUE(mp_unary_op(MP_UNARY_OP_HASH, index));
diff --git a/py/objdict.c b/py/objdict.c
index 725c708..31e538b 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -251,7 +251,7 @@
mp_obj_t iter = mp_getiter(args[1]);
mp_obj_t len = mp_obj_len_maybe(iter);
mp_obj_t value = mp_const_none;
- mp_obj_t next = NULL;
+ mp_obj_t next = MP_OBJ_NULL;
mp_obj_t self_out;
if (n_args > 2) {
@@ -374,7 +374,7 @@
} else {
// update from a generic iterable of pairs
mp_obj_t iter = mp_getiter(args[1]);
- mp_obj_t next = NULL;
+ mp_obj_t next = MP_OBJ_NULL;
while ((next = mp_iternext(iter)) != MP_OBJ_STOP_ITERATION) {
mp_obj_t inneriter = mp_getiter(next);
mp_obj_t key = mp_iternext(inneriter);