diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2023-06-02 12:33:25 +1000 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2023-06-08 17:54:21 +1000 |
commit | 2eba98f1e0d292de0f7e48ce228221ef50c01967 (patch) | |
tree | 2a4d35f0e5a994072b3cd929313e6d9c70fa9c48 /py/modsys.c | |
parent | 24c02c4eb5f11200f876bb57cd63a9d0bae91fd3 (diff) | |
download | micropython-2eba98f1e0d292de0f7e48ce228221ef50c01967.tar.gz micropython-2eba98f1e0d292de0f7e48ce228221ef50c01967.zip |
all: Use MP_REGISTER_EXTENSIBLE_MODULE for overrideable built-ins.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py/modsys.c')
-rw-r--r-- | py/modsys.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/py/modsys.c b/py/modsys.c index 1cfc09ecfb..ddc732e005 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -294,6 +294,9 @@ const mp_obj_module_t mp_module_sys = { .globals = (mp_obj_dict_t *)&mp_module_sys_globals, }; +// Unlike the other CPython-compatible modules, sys is not extensible from the +// filesystem. We rely on it to work so that things like sys.path are always +// available. MP_REGISTER_MODULE(MP_QSTR_sys, mp_module_sys); // If MICROPY_PY_SYS_PATH_ARGV_DEFAULTS is not enabled then these two lists |