diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-05 02:03:23 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-05 02:03:23 +0200 |
commit | 911089606376e60bd9451a85eb9558a23cde9039 (patch) | |
tree | feef6f9beac1fa1e146535b0186cfba2c7d92308 /py | |
parent | 630d85120fd2b745f314e6810e41144e026ff2f3 (diff) | |
download | micropython-911089606376e60bd9451a85eb9558a23cde9039.tar.gz micropython-911089606376e60bd9451a85eb9558a23cde9039.zip |
Remove older import helpers, no longer used.
Diffstat (limited to 'py')
-rw-r--r-- | py/lexerunix.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/py/lexerunix.c b/py/lexerunix.c index aa1cbc486d..fb62d3d72f 100644 --- a/py/lexerunix.c +++ b/py/lexerunix.c @@ -30,24 +30,4 @@ mp_lexer_t *mp_lexer_new_from_file(const char *filename) { return mp_lexer_new_from_str_len(qstr_from_str(filename), data, size, size); } -/******************************************************************************/ -/* unix implementation of import */ - -// TODO properly! - -static const char *import_base_dir = NULL; - -void mp_import_set_directory(const char *dir) { - import_base_dir = dir; -} - -mp_lexer_t *mp_import_open_file(qstr mod_name) { - vstr_t *vstr = vstr_new(); - if (import_base_dir != NULL) { - vstr_printf(vstr, "%s/", import_base_dir); - } - vstr_printf(vstr, "%s.py", qstr_str(mod_name)); - return mp_lexer_new_from_file(vstr_str(vstr)); // TODO does lexer need to copy the string? can we free it here? -} - #endif // MICROPY_ENABLE_LEXER_UNIX |