summaryrefslogtreecommitdiff
path: root/unix/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-10-17 23:51:39 +0100
committerDamien George <damien.p.george@gmail.com>2014-10-17 23:51:39 +0100
commitc92672d7f8fc410477a4e25789d15c1fd99b675b (patch)
tree99ca9effa3c45e1562727c231ca6658e51e557c3 /unix/main.c
parentb7a4b0f86f8f16394490441368adffce0404f75e (diff)
unix: Make -c option parse input script as a file, as per CPython.
Addresses issue #915.
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/main.c b/unix/main.c
index 86d7e9eb4..bb65e67c8 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -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) {