diff options
author | ian-v <ianv888@gmail.com> | 2014-01-06 13:51:53 -0800 |
---|---|---|
committer | ian-v <ianv888@gmail.com> | 2014-01-06 13:51:53 -0800 |
commit | 5fd8fd2c16076f683b629b513e8865e461d4c9a8 (patch) | |
tree | 9f10aab33ca9b4325cbe84c41b1e4d614d202021 /py/repl.c | |
parent | 7a16fadbf843ca5d49fb20b5f5785ffccfd9019f (diff) | |
download | micropython-5fd8fd2c16076f683b629b513e8865e461d4c9a8.tar.gz micropython-5fd8fd2c16076f683b629b513e8865e461d4c9a8.zip |
Revert MP_BOOL, etc. and use <stdbool.h> instead
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" -MP_BOOL str_startswith_word(const char *str, const char *head) { +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 MP_FALSE; + return false; } } return head[i] == '\0' && (str[i] == '\0' || !unichar_isalpha(str[i])); } -MP_BOOL mp_repl_is_compound_stmt(const char *line) { +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 @@ MP_BOOL mp_repl_is_compound_stmt(const char *line) { || str_startswith_word(line, "class") || str_startswith_word(line, "@") ) { - return MP_TRUE; + return true; } // also "compound" if unmatched open bracket |