From cf22f4793cb04e8e63a0d11f479a69c9be6c93ba Mon Sep 17 00:00:00 2001 From: Andrew Leech Date: Mon, 18 Feb 2019 14:58:44 +1100 Subject: 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 --- py/modarray.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'py/modarray.c') 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 -- cgit v1.2.3