diff options
author | Damien George <damien.p.george@gmail.com> | 2019-03-26 18:19:21 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-03-26 18:19:21 +1100 |
commit | 1556af19bfde9e8f14c84e2bc6a2c3a087e18325 (patch) | |
tree | 3ee38a873ca86b7c751c6dfb3891543edf28b83c | |
parent | 74d07469f276aff862a99423ded03f08ec5006b3 (diff) |
mpy-cross: Support compiling with MICROPY_PY___FILE__ enabled.
-rw-r--r-- | mpy-cross/main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mpy-cross/main.c b/mpy-cross/main.c index ef5d8752a..6e5af2739 100644 --- a/mpy-cross/main.c +++ b/mpy-cross/main.c @@ -67,9 +67,7 @@ STATIC int compile_and_save(const char *file, const char *output_file, const cha } #if MICROPY_PY___FILE__ - if (input_kind == MP_PARSE_FILE_INPUT) { - mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name)); - } + mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name)); #endif mp_parse_tree_t parse_tree = mp_parse(lex, MP_PARSE_FILE_INPUT); |