Skip to content

Commit 353e55d

Browse files
authored
Merge pull request #4688 from jepler/fix-pixelbuf-subscr
objtype: Restore our customized behavior of instance_subscr
2 parents 5ef9b10 + 90bdb25 commit 353e55d

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

ports/atmel-samd/boards/feather_m0_express/mpconfigboard.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@
2727
#define DEFAULT_UART_BUS_RX (&pin_PA11)
2828
#define DEFAULT_UART_BUS_TX (&pin_PA10)
2929

30+
// Other some pins that do not appear in the pinout & are not used internally
31+
// this list is not (yet) exhaustive
32+
#define IGNORE_PIN_PA03 1
33+
#define IGNORE_PIN_PB01 1
34+
#define IGNORE_PIN_PB03 1
35+
#define IGNORE_PIN_PB04 1
36+
#define IGNORE_PIN_PB05 1
37+
#define IGNORE_PIN_PB06 1
38+
#define IGNORE_PIN_PB07 1
39+
#define IGNORE_PIN_PB12 1
40+
3041
// USB is always used internally so skip the pin objects for it.
3142
#define IGNORE_PIN_PA24 1
3243
#define IGNORE_PIN_PA25 1

ports/atmel-samd/boards/snekboard/mpconfigboard.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@
2323
#define DEFAULT_UART_BUS_RX (&pin_PB08) /* ANALOG 1 */
2424
#define DEFAULT_UART_BUS_TX (&pin_PB09) /* ANALOG 2 */
2525

26+
// Other some pins that do not appear in the pinout & are not used internally
27+
// this list is not (yet) exhaustive
28+
#define IGNORE_PIN_PA01 1
29+
#define IGNORE_PIN_PA03 1
30+
#define IGNORE_PIN_PB04 1
31+
#define IGNORE_PIN_PB05 1
32+
#define IGNORE_PIN_PB00 1
33+
#define IGNORE_PIN_PB01 1
34+
#define IGNORE_PIN_PB02 1
35+
#define IGNORE_PIN_PB04 1
36+
#define IGNORE_PIN_PB05 1
37+
#define IGNORE_PIN_PB06 1
38+
#define IGNORE_PIN_PB07 1
39+
#define IGNORE_PIN_PB12 1
40+
2641
// USB is always used internally so skip the pin objects for it.
2742
#define IGNORE_PIN_PA24 1
2843
#define IGNORE_PIN_PA25 1

py/objtype.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,8 @@ STATIC mp_obj_t instance_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value
854854
}
855855
mp_obj_class_lookup(&lookup, self->base.type);
856856
if (member[0] == MP_OBJ_SENTINEL) {
857-
mp_obj_t ret = mp_obj_subscr(self->subobj[0], index, value);
857+
mp_obj_type_t *subobj_type = mp_obj_get_type(self->subobj[0]);
858+
mp_obj_t ret = subobj_type->subscr(self_in, index, value);
858859
// May have called port specific C code. Make sure it didn't mess up the heap.
859860
assert_heap_ok();
860861
return ret;

0 commit comments

Comments
 (0)