From 60c5968f99393506cf97fe6bf5a3d3d0d39723f3 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Wed, 20 Apr 2022 21:14:47 +1000 Subject: [PATCH] pic16bit: Make port-specific modules use MP_REGISTER_MODULE. Signed-off-by: Jim Mussared --- ports/pic16bit/modpyb.c | 2 ++ ports/pic16bit/mpconfigport.h | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ports/pic16bit/modpyb.c b/ports/pic16bit/modpyb.c index a18b37700..61955509e 100644 --- a/ports/pic16bit/modpyb.c +++ b/ports/pic16bit/modpyb.c @@ -68,3 +68,5 @@ const mp_obj_module_t pyb_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t *)&pyb_module_globals, }; + +MP_REGISTER_MODULE(MP_QSTR_pyb, pyb_module, 1); diff --git a/ports/pic16bit/mpconfigport.h b/ports/pic16bit/mpconfigport.h index 43300d176..52b1701ea 100644 --- a/ports/pic16bit/mpconfigport.h +++ b/ports/pic16bit/mpconfigport.h @@ -88,11 +88,6 @@ typedef int mp_off_t; #define MICROPY_PORT_BUILTINS \ { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, -// extra builtin modules to add to the list of known ones -extern const struct _mp_obj_module_t pyb_module; -#define MICROPY_PORT_BUILTIN_MODULES \ - { MP_ROM_QSTR(MP_QSTR_pyb), MP_ROM_PTR(&pyb_module) }, \ - #define MP_STATE_PORT MP_STATE_VM #define MICROPY_PORT_ROOT_POINTERS \