summaryrefslogtreecommitdiffstatshomepage
path: root/py/lexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/lexer.h')
-rw-r--r--py/lexer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/py/lexer.h b/py/lexer.h
index 3118df62c8..17c472d983 100644
--- a/py/lexer.h
+++ b/py/lexer.h
@@ -141,7 +141,8 @@ typedef enum _mp_token_kind_t {
// the next-byte function must return the next byte in the stream
// it must return MP_LEXER_EOF if end of stream
// it can be called again after returning MP_LEXER_EOF, and in that case must return MP_LEXER_EOF
-#define MP_LEXER_EOF (-1)
+#define MP_LEXER_EOF ((unichar)(-1))
+
typedef mp_uint_t (*mp_lexer_stream_next_byte_t)(void*);
typedef void (*mp_lexer_stream_close_t)(void*);