diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-13 12:52:39 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-13 12:52:39 +0100 |
commit | 640e7e4779d5d6b5e53fa305e5fe824da7783090 (patch) | |
tree | c299b3caf77aca8923a6fdb5554dd5a27ffc4c4e /py/builtinimport.c | |
parent | f95c68e53638aa363797595b0d618bbe08c56bb3 (diff) | |
parent | 4165cd1c0cfc4eabf446be504787090be84a421b (diff) |
Merge pull request #476 from pfalcon/static-sys
Convert sys module to static allocation
Diffstat (limited to 'py/builtinimport.c')
-rw-r--r-- | py/builtinimport.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 3fb658c27..4af7dd7ed 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -28,8 +28,6 @@ #define PATH_SEP_CHAR '/' -mp_obj_t mp_sys_path; - mp_import_stat_t stat_dir_or_file(vstr_t *path) { //printf("stat %s\n", vstr_str(path)); mp_import_stat_t stat = mp_import_stat(vstr_str(path)); @@ -48,9 +46,7 @@ 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 (mp_sys_path != MP_OBJ_NULL) { - mp_obj_list_get(mp_sys_path, &path_num, &path_items); - } + mp_obj_list_get(mp_sys_path, &path_num, &path_items); if (path_num == 0) { // mp_sys_path is empty, so just use the given file name |