unix: Make -c option parse input script as a file, as per CPython.

Addresses issue #915.
This commit is contained in:
Damien George 2014-10-17 23:51:39 +01:00
parent b7a4b0f86f
commit c92672d7f8

View File

@ -193,7 +193,7 @@ STATIC int do_file(const char *file) {
STATIC int do_str(const char *str) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, str, strlen(str), false);
return execute_from_lexer(lex, MP_PARSE_SINGLE_INPUT, false);
return execute_from_lexer(lex, MP_PARSE_FILE_INPUT, false);
}
int usage(char **argv) {