py: Remove unnecessary BINARY_OP_EQUAL code that just checks pointers.
Previous patch c38dc3ccc76d1a9bf867704f43ea5d15da3fea7b allowed any
object to be compared with any other, using pointer comparison for a
fallback. As such, existing code which checked for this case is no
longer needed.
diff --git a/py/objstr.c b/py/objstr.c
index 688988c..01ed3a2 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -348,16 +348,12 @@
} else if (lhs_type == &mp_type_bytes) {
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(rhs_in, &bufinfo, MP_BUFFER_READ)) {
- goto incompatible;
+ return MP_OBJ_NULL; // op not supported
}
rhs_data = bufinfo.buf;
rhs_len = bufinfo.len;
} else {
// incompatible types
- incompatible:
- if (op == MP_BINARY_OP_EQUAL) {
- return mp_const_false; // can check for equality against every type
- }
return MP_OBJ_NULL; // op not supported
}