mp_obj_equal(): Print which types' equality not implemented before assert().

This commit is contained in:
Paul Sokolovsky 2014-01-10 04:14:10 +02:00
parent e06edce786
commit d6f27fe317

View File

@ -116,6 +116,8 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2) {
} else if (MP_OBJ_IS_TYPE(o1, &str_type) && MP_OBJ_IS_TYPE(o2, &str_type)) {
return mp_obj_str_get(o1) == mp_obj_str_get(o2);
} else {
// TODO: Debugging helper
printf("Equality for '%s' and '%s' types not yet implemented\n", mp_obj_get_type_str(o1), mp_obj_get_type_str(o2));
assert(0);
return false;
}