diff options
author | Laurens Valk <laurens@pybricks.com> | 2022-11-29 10:38:57 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2022-12-06 13:34:17 +1100 |
commit | f724d90e6c0c6dadf0a746ba1413517d6ce497db (patch) | |
tree | acaa09d8dd752c7cd059454c15fb54b254da4821 /py/modmicropython.c | |
parent | fb7d211530d842b6efdc230c8834d9d0bd6f6f67 (diff) | |
download | micropython-f724d90e6c0c6dadf0a746ba1413517d6ce497db.tar.gz micropython-f724d90e6c0c6dadf0a746ba1413517d6ce497db.zip |
py/modmicropython: Make module optional.
This module is useful, but it is not always needed. Disabling it saves
several kilobytes of build size, depending on other config options.
Signed-off-by: Laurens Valk <laurens@pybricks.com>
Diffstat (limited to 'py/modmicropython.c')
-rw-r--r-- | py/modmicropython.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/modmicropython.c b/py/modmicropython.c index eafff90c60..c717926e66 100644 --- a/py/modmicropython.c +++ b/py/modmicropython.c @@ -32,6 +32,8 @@ #include "py/gc.h" #include "py/mphal.h" +#if MICROPY_PY_MICROPYTHON + // Various builtins specific to MicroPython runtime, // living in micropython module @@ -211,3 +213,5 @@ const mp_obj_module_t mp_module_micropython = { }; MP_REGISTER_MODULE(MP_QSTR_micropython, mp_module_micropython); + +#endif // MICROPY_PY_MICROPYTHON |