summaryrefslogtreecommitdiffstatshomepage
path: root/py/modstruct.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/modstruct.c')
-rw-r--r--py/modstruct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/modstruct.c b/py/modstruct.c
index 81afd94d16..2a3c3c0ad6 100644
--- a/py/modstruct.c
+++ b/py/modstruct.c
@@ -98,8 +98,8 @@ STATIC const mp_obj_dict_t mp_module_struct_globals = {
.map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = sizeof(mp_module_struct_globals_table) / sizeof(mp_map_elem_t),
- .alloc = sizeof(mp_module_struct_globals_table) / sizeof(mp_map_elem_t),
+ .used = ARRAY_SIZE(mp_module_struct_globals_table),
+ .alloc = ARRAY_SIZE(mp_module_struct_globals_table),
.table = (mp_map_elem_t*)mp_module_struct_globals_table,
},
};