summaryrefslogtreecommitdiff
path: root/extmod/modwebsocket.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-06-02 12:33:25 +1000
committerJim Mussared <jim.mussared@gmail.com>2023-06-08 17:54:21 +1000
commit2eba98f1e0d292de0f7e48ce228221ef50c01967 (patch)
tree2a4d35f0e5a994072b3cd929313e6d9c70fa9c48 /extmod/modwebsocket.c
parent24c02c4eb5f11200f876bb57cd63a9d0bae91fd3 (diff)
all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/modwebsocket.c')
-rw-r--r--extmod/modwebsocket.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/extmod/modwebsocket.c b/extmod/modwebsocket.c
index 3bf50cc58..d2cb72039 100644
--- a/extmod/modwebsocket.c
+++ b/extmod/modwebsocket.c
@@ -311,6 +311,10 @@ const mp_obj_module_t mp_module_websocket = {
.globals = (mp_obj_dict_t *)&websocket_module_globals,
};
-MP_REGISTER_MODULE(MP_QSTR_websocket, mp_module_websocket);
+// 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 `uwebsocket`, so by making it extensible the
+// `uwebsocket` alias will continue to work.
+MP_REGISTER_EXTENSIBLE_MODULE(MP_QSTR_websocket, mp_module_websocket);
#endif // MICROPY_PY_WEBSOCKET