diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-26 10:47:29 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-26 10:47:29 +0100 |
commit | 6d3c5e4301df363055dc256e6692c610e4d0b918 (patch) | |
tree | a07a18ed1a13d50990cf0e43a2a3c919cb14240d /py/modmicropython.c | |
parent | d139c489bab6b58906868e3fc8383ea813a122d4 (diff) |
Add ARRAY_SIZE macro, and use it where possible.
Diffstat (limited to 'py/modmicropython.c')
-rw-r--r-- | py/modmicropython.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/modmicropython.c b/py/modmicropython.c index ed245969c..b8ddbfe2a 100644 --- a/py/modmicropython.c +++ b/py/modmicropython.c @@ -39,8 +39,8 @@ STATIC const mp_obj_dict_t mp_module_micropython_globals = { .map = { .all_keys_are_qstrs = 1, .table_is_fixed_array = 1, - .used = sizeof(mp_module_micropython_globals_table) / sizeof(mp_map_elem_t), - .alloc = sizeof(mp_module_micropython_globals_table) / sizeof(mp_map_elem_t), + .used = ARRAY_SIZE(mp_module_micropython_globals_table), + .alloc = ARRAY_SIZE(mp_module_micropython_globals_table), .table = (mp_map_elem_t*)mp_module_micropython_globals_table, }, }; |