unix: Enable MICROPY_PY_STR_BYTES_CMP_WARN.
Also, fix a warning text (remove "duplicate" BytesWarning).
This commit is contained in:
parent
a1b442bc07
commit
918851e836
2
py/obj.c
2
py/obj.c
|
@ -199,7 +199,7 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2) {
|
|||
str_cmp_err:
|
||||
#if MICROPY_PY_STR_BYTES_CMP_WARN
|
||||
if (MP_OBJ_IS_TYPE(o1, &mp_type_bytes) || MP_OBJ_IS_TYPE(o2, &mp_type_bytes)) {
|
||||
mp_warning("BytesWarning: Comparison between bytes and str");
|
||||
mp_warning("Comparison between bytes and str");
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
// names in exception messages (may require more RAM).
|
||||
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
|
||||
#define MICROPY_WARNINGS (1)
|
||||
#define MICROPY_PY_STR_BYTES_CMP_WARN (1)
|
||||
|
||||
// Define to 1 to use undertested inefficient GC helper implementation
|
||||
// (if more efficient arch-specific one is not available).
|
||||
|
|
Loading…
Reference in New Issue