Factor and simplify Makefile's and mpconfig, part 2.

This commit is contained in:
Damien George
2014-01-07 15:20:33 +00:00
parent 136f67523b
commit d3ebe4829d
10 changed files with 56 additions and 85 deletions

View File

@@ -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