summaryrefslogtreecommitdiffstatshomepage
path: root/py/repl.c
diff options
context:
space:
mode:
authorian-v <ianv888@gmail.com>2014-01-06 09:52:29 -0800
committerian-v <ianv888@gmail.com>2014-01-06 09:52:29 -0800
commit7a16fadbf843ca5d49fb20b5f5785ffccfd9019f (patch)
tree167d326efc1a1a75d3a371bbeab1a0bc4164fd9e /py/repl.c
parente03c0533fe467439bae1addd6d2a2ee57a9370e4 (diff)
downloadmicropython-7a16fadbf843ca5d49fb20b5f5785ffccfd9019f.tar.gz
micropython-7a16fadbf843ca5d49fb20b5f5785ffccfd9019f.zip
Co-exist with C++ (issue #85)
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 4241ef0e4c..2127a28dfb 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -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