summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/obj.h b/py/obj.h
index 8a8a1eb211..febff67c29 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -106,8 +106,8 @@ typedef struct _mp_obj_base_t mp_obj_base_t;
.map = { \
.all_keys_are_qstrs = 1, \
.table_is_fixed_array = 1, \
- .used = sizeof(table_name) / sizeof(mp_map_elem_t), \
- .alloc = sizeof(table_name) / sizeof(mp_map_elem_t), \
+ .used = MP_ARRAY_SIZE(table_name), \
+ .alloc = MP_ARRAY_SIZE(table_name), \
.table = (mp_map_elem_t*)table_name, \
}, \
}