From 7c2fbff965c077aaac41d392462030925bf920e0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 22 Sep 2023 14:25:23 -0500 Subject: [PATCH] fix use of locals_dict --- py/enum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/enum.c b/py/enum.c index 0d1868576f..5a50a93ff3 100644 --- a/py/enum.c +++ b/py/enum.c @@ -28,7 +28,7 @@ #include "py/runtime.h" mp_obj_t cp_enum_find(const mp_obj_type_t *type, int value) { - const mp_obj_dict_t *dict = type->locals_dict; + const mp_obj_dict_t *dict = MP_OBJ_TYPE_GET_SLOT(type, locals_dict); for (size_t i = 0; i < dict->map.used; i++) { const cp_enum_obj_t *v = MP_OBJ_TO_PTR(dict->map.table[i].value); if (v->value == value) {