summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/modffi.c4
-rw-r--r--unix/modsocket.c4
-rw-r--r--unix/modtime.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/unix/modffi.c b/unix/modffi.c
index 56ea6ed307..be542625ed 100644
--- a/unix/modffi.c
+++ b/unix/modffi.c
@@ -394,8 +394,8 @@ STATIC const mp_obj_dict_t mp_module_ffi_globals = {
.map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = sizeof(mp_module_ffi_globals_table) / sizeof(mp_map_elem_t),
- .alloc = sizeof(mp_module_ffi_globals_table) / sizeof(mp_map_elem_t),
+ .used = ARRAY_SIZE(mp_module_ffi_globals_table),
+ .alloc = ARRAY_SIZE(mp_module_ffi_globals_table),
.table = (mp_map_elem_t*)mp_module_ffi_globals_table,
},
};
diff --git a/unix/modsocket.c b/unix/modsocket.c
index 4c76502da6..e52f5d92a9 100644
--- a/unix/modsocket.c
+++ b/unix/modsocket.c
@@ -378,8 +378,8 @@ STATIC const mp_obj_dict_t mp_module_socket_globals = {
.map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = sizeof(mp_module_socket_globals_table) / sizeof(mp_map_elem_t),
- .alloc = sizeof(mp_module_socket_globals_table) / sizeof(mp_map_elem_t),
+ .used = ARRAY_SIZE(mp_module_socket_globals_table),
+ .alloc = ARRAY_SIZE(mp_module_socket_globals_table),
.table = (mp_map_elem_t*)mp_module_socket_globals_table,
},
};
diff --git a/unix/modtime.c b/unix/modtime.c
index a0d7cd0462..d8ca0e4ef5 100644
--- a/unix/modtime.c
+++ b/unix/modtime.c
@@ -63,8 +63,8 @@ STATIC const mp_obj_dict_t mp_module_time_globals = {
.map = {
.all_keys_are_qstrs = 1,
.table_is_fixed_array = 1,
- .used = sizeof(mp_module_time_globals_table) / sizeof(mp_map_elem_t),
- .alloc = sizeof(mp_module_time_globals_table) / sizeof(mp_map_elem_t),
+ .used = ARRAY_SIZE(mp_module_time_globals_table),
+ .alloc = ARRAY_SIZE(mp_module_time_globals_table),
.table = (mp_map_elem_t*)mp_module_time_globals_table,
},
};