aboutsummaryrefslogtreecommitdiff
path: root/py/modarray.c
diff options
context:
space:
mode:
authorAndrew Leech <andrew.leech@planetinnovation.com.au>2019-02-18 14:58:44 +1100
committerDamien George <damien.p.george@gmail.com>2019-03-08 22:46:43 +1100
commitcf22f4793cb04e8e63a0d11f479a69c9be6c93ba (patch)
treed567e429710b58ad9283d3e9c1a389cde64e0e83 /py/modarray.c
parente4ac104b7f2980114c6d1b0d8ff5917777cf8f24 (diff)
py: Allow registration of modules at their definition.
During make, makemoduledefs.py parses the current builds c files for MP_REGISTER_MODULE(module_name, obj_module, enabled_define) These are used to generate a header with the required entries for "mp_rom_map_elem_t mp_builtin_module_table[]" in py/objmodule.c
Diffstat (limited to 'py/modarray.c')
-rw-r--r--py/modarray.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/modarray.c b/py/modarray.c
index c0cdca928..de84fc858 100644
--- a/py/modarray.c
+++ b/py/modarray.c
@@ -40,4 +40,6 @@ const mp_obj_module_t mp_module_array = {
.globals = (mp_obj_dict_t*)&mp_module_array_globals,
};
+MP_REGISTER_MODULE(MP_QSTR_array, mp_module_array, MICROPY_PY_ARRAY);
+
#endif