10000 mpy-cross: Support compiling with MICROPY_PY___FILE__ enabled. · rlucia/micropython@1556af1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1556af1

Browse files
committed
mpy-cross: Support compiling with MICROPY_PY___FILE__ enabled.
1 parent 74d0746 commit 1556af1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mpy-cross/main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ STATIC int compile_and_save(const char *file, const char *output_file, const cha
6767
}
6868

6969
#if MICROPY_PY___FILE__
70-
if (input_kind == MP_PARSE_FILE_INPUT) {
71-
mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name));
72-
}
70+
mp_store_global(MP_QSTR___file__, MP_OBJ_NEW_QSTR(source_name));
7371
#endif
7472

7573
mp_parse_tree_t parse_tree = mp_parse(lex, MP_PARSE_FILE_INPUT);

0 commit comments

Comments
 (0)
0