8000 py: Add more #if's for configurable MOD_SYS. · lurch/micropython@49f20b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 49f20b8

Browse files
committed
py: Add more #if's for configurable MOD_SYS.
1 parent 640e7e4 commit 49f20b8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

py/builtinimport.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ mp_import_stat_t find_file(const char *file_str, uint file_len, vstr_t *dest) {
4646
// extract the list of paths
4747
uint path_num = 0;
4848
mp_obj_t *path_items;
49+
#if MICROPY_ENABLE_MOD_SYS
4950
mp_obj_list_get(mp_sys_path, &path_num, &path_items);
51+
#endif
5052

5153
if (path_num == 0) {
5254
// mp_sys_path is empty, so just use the given file name

py/builtintables.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = {
134134
#if MICROPY_ENABLE_FLOAT
135135
{ MP_OBJ_NEW_QSTR(MP_QSTR_math), (mp_obj_t)&mp_module_math },
136136
#endif
137+
#if MICROPY_ENABLE_MOD_SYS
137138
{ MP_OBJ_NEW_QSTR(MP_QSTR_sys), (mp_obj_t)&mp_module_sys },
139+
#endif
138140

139141
// extra builtin modules as defined by a port
140142
MICROPY_EXTRA_BUILTIN_MODULES

0 commit comments

Comments
 (0)
0