Age | Commit message (Collapse) | Author |
|
|
|
This patch simplifies the str creation API to favour the common case of
creating a str object that is not forced to be interned. To force
interning of a new str the new mp_obj_new_str_via_qstr function is added,
and should only be used if warranted.
Apart from simplifying the mp_obj_new_str function (and making it have the
same signature as mp_obj_new_bytes), this patch also reduces code size by a
bit (-16 bytes for bare-arm and roughly -40 bytes on the bare-metal archs).
|
|
As a pointer (const char *) it takes up an extra word of storage which is
in RAM.
|
|
Reduces code size by about 10 bytes.
|
|
This is how CPython does it, and it's very useful to help users discover
the available modules for a given port, especially built-in and frozen
modules. The function does not list modules that are in the filesystem
because this would require a fair bit of work to do correctly, and is very
port specific (depending on the filesystem).
|
|
This builtin is configured using MICROPY_PY_BUILTINS_HELP, and is disabled
by default.
|