diff options
author | ian-v <ianv888@gmail.com> | 2014-01-06 09:52:29 -0800 |
---|---|---|
committer | ian-v <ianv888@gmail.com> | 2014-01-06 09:52:29 -0800 |
commit | 7a16fadbf843ca5d49fb20b5f5785ffccfd9019f (patch) | |
tree | 167d326efc1a1a75d3a371bbeab1a0bc4164fd9e /py/repl.c | |
parent | e03c0533fe467439bae1addd6d2a2ee57a9370e4 (diff) | |
download | micropython-7a16fadbf843ca5d49fb20b5f5785ffccfd9019f.tar.gz micropython-7a16fadbf843ca5d49fb20b5f5785ffccfd9019f.zip |
Co-exist with C++ (issue #85)
Diffstat (limited to 'py/repl.c')
-rw-r--r-- | py/repl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,17 +1,17 @@ #include "misc.h" #include "repl.h" -bool str_startswith_word(const char *str, const char *head) { +MP_BOOL str_startswith_word(const char *str, const char *head) { int i; for (i = 0; str[i] && head[i]; i++) { if (str[i] != head[i]) { - return false; + return MP_FALSE; } } return head[i] == '\0' && (str[i] == '\0' || !unichar_isalpha(str[i])); } -bool mp_repl_is_compound_stmt(const char *line) { +MP_BOOL mp_repl_is_compound_stmt(const char *line) { // compound if line starts with a certain keyword if ( str_startswith_word(line, "if") @@ -23,7 +23,7 @@ bool mp_repl_is_compound_stmt(const char *line) { || str_startswith_word(line, "class") || str_startswith_word(line, "@") ) { - return true; + return MP_TRUE; } // also "compound" if unmatched open bracket |