Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
49f20b84
Commit
49f20b84
authored
Apr 13, 2014
by
Damien George
Browse files
py: Add more #if's for configurable MOD_SYS.
parent
640e7e47
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/builtinimport.c
View file @
49f20b84
...
...
@@ -46,7 +46,9 @@ mp_import_stat_t find_file(const char *file_str, uint file_len, vstr_t *dest) {
// extract the list of paths
uint
path_num
=
0
;
mp_obj_t
*
path_items
;
#if MICROPY_ENABLE_MOD_SYS
mp_obj_list_get
(
mp_sys_path
,
&
path_num
,
&
path_items
);
#endif
if
(
path_num
==
0
)
{
// mp_sys_path is empty, so just use the given file name
...
...
py/builtintables.c
View file @
49f20b84
...
...
@@ -134,7 +134,9 @@ STATIC const mp_map_elem_t mp_builtin_module_table[] = {
#if MICROPY_ENABLE_FLOAT
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_math
),
(
mp_obj_t
)
&
mp_module_math
},
#endif
#if MICROPY_ENABLE_MOD_SYS
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_sys
),
(
mp_obj_t
)
&
mp_module_sys
},
#endif
// extra builtin modules as defined by a port
MICROPY_EXTRA_BUILTIN_MODULES
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment