summaryrefslogtreecommitdiff
path: root/py/objmodule.c
diff options
context:
space:
mode:
authorDamiano Mazzella <damianomazzella@gmail.com>2019-04-05 21:40:28 +0200
committerGitHub <noreply@github.com>2019-04-05 21:40:28 +0200
commitaf38f882ec981a967373eee857dc84c0c13e1d7f (patch)
tree204a020d8853c2d3a0814cc03c5e3f152c1d30c1 /py/objmodule.c
parent7549326ceb5008a5591e097d20ee1baf349e78dc (diff)
Update objmodule.c
Diffstat (limited to 'py/objmodule.c')
-rw-r--r--py/objmodule.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/py/objmodule.c b/py/objmodule.c
index 469a95976..627ba79e8 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -32,6 +32,8 @@
#include "py/runtime.h"
#include "py/builtin.h"
+#include "genhdr/moduledefs.h"
+
STATIC void module_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)kind;
mp_obj_module_t *self = MP_OBJ_TO_PTR(self_in);
@@ -252,6 +254,11 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
// extra builtin modules as defined by a port
MICROPY_PORT_BUILTIN_MODULES
+ #ifdef MICROPY_REGISTERED_MODULES
+ // builtin modules declared with MP_REGISTER_MODULE()
+ MICROPY_REGISTERED_MODULES
+ #endif
+
#if defined(MICROPY_DEBUG_MODULES) && defined(MICROPY_PORT_BUILTIN_DEBUG_MODULES)
, MICROPY_PORT_BUILTIN_DEBUG_MODULES
#endif