diff options
author | Jeff Epler <jepler@unpythonic.net> | 2025-09-26 10:23:06 -0500 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-10-04 16:22:32 +1000 |
commit | 41284577ca389c463a3e69302de8ad0edaf97f24 (patch) | |
tree | e588263e8bc49c14c5c9cbb04e00e69b6a558492 /py/builtinhelp.c | |
parent | 653f7784d7e566531ed1678486631c6c89aeedb7 (diff) |
py/makemoduledefs.py: Avoid empty extensible module lists.
An empty array is a C extension supported by clang & GCC but not MSVC.
This also saves a bit of code size if there are no extensible modules.
Fixes issue #18141.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
Diffstat (limited to 'py/builtinhelp.c')
-rw-r--r-- | py/builtinhelp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/builtinhelp.c b/py/builtinhelp.c index c08c2e3b6..dc4fe582f 100644 --- a/py/builtinhelp.c +++ b/py/builtinhelp.c @@ -79,7 +79,9 @@ static void mp_help_print_modules(void) { mp_obj_t list = mp_obj_new_list(0, NULL); mp_help_add_from_map(list, &mp_builtin_module_map); + #if MICROPY_HAVE_REGISTERED_EXTENSIBLE_MODULES mp_help_add_from_map(list, &mp_builtin_extensible_module_map); + #endif #if MICROPY_MODULE_FROZEN extern const char mp_frozen_names[]; |