all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2023-06-02 12:33:25 +10:00
parent 24c02c4eb5
commit 2eba98f1e0
47 changed files with 68 additions and 48 deletions

View File

@@ -1004,7 +1004,11 @@ const mp_obj_module_t mp_module_bluetooth = {
.globals = (mp_obj_dict_t *)&mp_module_bluetooth_globals,
};
MP_REGISTER_MODULE(MP_QSTR_bluetooth, mp_module_bluetooth);
// This module should not be extensible (as it is not a CPython standard
// library nor is it necessary to override from the filesystem), however it
// has previously been known as `ubluetooth`, so by making it extensible the
// `ubluetooth` alias will continue to work.
MP_REGISTER_EXTENSIBLE_MODULE(MP_QSTR_bluetooth, mp_module_bluetooth);
// Helpers