From 8123dc8bf7a1aa4ed4cf9254b6aa930a7b851c77 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sat, 28 Oct 2023 19:33:37 +0200 Subject: [PATCH] Fix keypad classes to show the events property It looks like we need the MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS flag on the class for properties to work, and the Keys, KeyMatrix and ShiftRegisterKeys classes were missing it, so the "events" property didn't appear on the instances. --- shared-bindings/keypad/KeyMatrix.c | 2 +- shared-bindings/keypad/Keys.c | 2 +- shared-bindings/keypad/ShiftRegisterKeys.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/keypad/KeyMatrix.c b/shared-bindings/keypad/KeyMatrix.c index 3da3773455..21f83c5e8e 100644 --- a/shared-bindings/keypad/KeyMatrix.c +++ b/shared-bindings/keypad/KeyMatrix.c @@ -253,7 +253,7 @@ STATIC MP_DEFINE_CONST_DICT(keypad_keymatrix_locals_dict, keypad_keymatrix_local MP_DEFINE_CONST_OBJ_TYPE( keypad_keymatrix_type, MP_QSTR_KeyMatrix, - MP_TYPE_FLAG_NONE, + MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS, make_new, keypad_keymatrix_make_new #if CIRCUITPY_KEYPAD_KEYMATRIX , locals_dict, &keypad_keymatrix_locals_dict diff --git a/shared-bindings/keypad/Keys.c b/shared-bindings/keypad/Keys.c index 870ee03b3f..ff6052e271 100644 --- a/shared-bindings/keypad/Keys.c +++ b/shared-bindings/keypad/Keys.c @@ -187,7 +187,7 @@ STATIC MP_DEFINE_CONST_DICT(keypad_keys_locals_dict, keypad_keys_locals_dict_tab MP_DEFINE_CONST_OBJ_TYPE( keypad_keys_type, MP_QSTR_Keys, - MP_TYPE_FLAG_NONE, + MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS, make_new, keypad_keys_make_new #if CIRCUITPY_KEYPAD_KEYS , locals_dict, &keypad_keys_locals_dict diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 18e0565fcf..e9df19e324 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -239,7 +239,7 @@ STATIC MP_DEFINE_CONST_DICT(keypad_shiftregisterkeys_locals_dict, keypad_shiftre MP_DEFINE_CONST_OBJ_TYPE( keypad_shiftregisterkeys_type, MP_QSTR_ShiftRegisterKeys, - MP_TYPE_FLAG_NONE, + MP_TYPE_FLAG_HAS_SPECIAL_ACCESSORS, make_new, keypad_shiftregisterkeys_make_new #if CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS , locals_dict, &keypad_shiftregisterkeys_locals_dict