summaryrefslogtreecommitdiffstatshomepage
path: root/py/repl.c
diff options
context:
space:
mode:
authorian-v <ianv888@gmail.com>2014-01-06 13:51:53 -0800
committerian-v <ianv888@gmail.com>2014-01-06 13:51:53 -0800
commit5fd8fd2c16076f683b629b513e8865e461d4c9a8 (patch)
tree9f10aab33ca9b4325cbe84c41b1e4d614d202021 /py/repl.c
parent7a16fadbf843ca5d49fb20b5f5785ffccfd9019f (diff)
downloadmicropython-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/repl.c b/py/repl.c
index 2127a28dfb..4241ef0e4c 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -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