From af38f882ec981a967373eee857dc84c0c13e1d7f Mon Sep 17 00:00:00 2001 From: Damiano Mazzella Date: Fri, 5 Apr 2019 21:40:28 +0200 Subject: [PATCH] Update objmodule.c --- py/objmodule.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/py/objmodule.c b/py/objmodule.c index 469a95976a..627ba79e8a 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