summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-11-29 14:39:27 +0000
committerDamien George <damien.p.george@gmail.com>2014-11-29 14:39:27 +0000
commit3b603f29ec093b77b6fad72d77becd5375310637 (patch)
treecd895173eeebc93b29f7667614d9f6c9ed900fad /py/obj.h
parente636279fe07898c5cfd0d33197cdf79f42f76b96 (diff)
Use MP_DEFINE_CONST_DICT macro to define module dicts.
This is just a clean-up of the code. Generated code is exactly the same.
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 8a8a1eb21..febff67c2 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, \
}, \
}