fix use of locals_dict
This commit is contained in:
parent
d1ee906afd
commit
7c2fbff965
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue