diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-07 15:20:33 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-07 15:20:33 +0000 |
commit | d3ebe4829d920542e5af462e75179e4f0cadb946 (patch) | |
tree | 98b13b97030af834ef0a18114007edc43d442acf /py/lexerunix.c | |
parent | 136f67523b10d24dd65cb25e49e07a7e4e5341a1 (diff) |
Factor and simplify Makefile's and mpconfig, part 2.
Diffstat (limited to 'py/lexerunix.c')
-rw-r--r-- | py/lexerunix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/lexerunix.c b/py/lexerunix.c index 14c28c16d..5336610ba 100644 --- a/py/lexerunix.c +++ b/py/lexerunix.c @@ -4,8 +4,11 @@ #include <fcntl.h> #include "misc.h" +#include "mpconfig.h" #include "lexer.h" +#if MICROPY_ENABLE_LEXER_UNIX + typedef struct _str_buf_t { bool free; // free src_beg when done const char *src_beg; // beginning of source @@ -78,3 +81,5 @@ mp_lexer_t *mp_import_open_file(qstr mod_name) { 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 |