py/objarray: Turn on MP_TYPE_FLAG_EQ_CHECKS_OTHER_TYPE for memoryview.

And add corresponding tests.

Fixes #5674 (comparison of memoryview against bytes).
This commit is contained in:
Jim Mussared
2020-02-20 21:29:30 +11:00
committed by Damien George
parent 2d800c77a0
commit 3ccce89b83
2 changed files with 19 additions and 0 deletions

View File

@@ -573,6 +573,7 @@ const mp_obj_type_t mp_type_bytearray = {
#if MICROPY_PY_BUILTINS_MEMORYVIEW
const mp_obj_type_t mp_type_memoryview = {
{ &mp_type_type },
.flags = MP_TYPE_FLAG_EQ_CHECKS_OTHER_TYPE,
.name = MP_QSTR_memoryview,
.make_new = memoryview_make_new,
.getiter = array_iterator_new,