objtype: Restore our customized behavior of instance_subscr

For pixelbuf's [] to be able to call _transmit on the Python subclass,
we need to do the subscripting operation specially.
This commit is contained in:
Jeff Epler 2021-04-29 11:59:11 -05:00
parent 52589691b8
commit d1e17fdccc
1 changed files with 2 additions and 1 deletions

View File

@ -854,7 +854,8 @@ STATIC mp_obj_t instance_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value
}
mp_obj_class_lookup(&lookup, self->base.type);
if (member[0] == MP_OBJ_SENTINEL) {
mp_obj_t ret = mp_obj_subscr(self->subobj[0], index, value);
mp_obj_type_t *subobj_type = mp_obj_get_type(self->subobj[0]);
mp_obj_t ret = subobj_type->subscr(self_in, index, value);
// May have called port specific C code. Make sure it didn't mess up the heap.
assert_heap_ok();
return ret;