From a2f3c265a9b155ba9c14aa10ba878667d906d290 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 9 Sep 2013 23:16:19 -0400 Subject: [PATCH] stop ignoring utf8 characters in repl-basic. fix #4224 --- ui/repl-basic.c | 4 ++-- ui/repl-readline.c | 4 ++-- ui/repl.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/repl-basic.c b/ui/repl-basic.c index 55bdb3b5263ae..b496fd7d5a271 100644 --- a/ui/repl-basic.c +++ b/ui/repl-basic.c @@ -151,9 +151,9 @@ static void basic_stdin_callback(void) jl_input_line_callback(stdin_buf); } -void jl_readBuffer(char* base, ssize_t nread) +void jl_readBuffer(unsigned char* base, ssize_t nread) { - char *start = base; + unsigned char *start = base; int esc = 0; int newline = 0; while (*start != 0 && nread > 0) { diff --git a/ui/repl-readline.c b/ui/repl-readline.c index c04a9f810b40f..8d788e82569b5 100644 --- a/ui/repl-readline.c +++ b/ui/repl-readline.c @@ -791,9 +791,9 @@ void repl_callback_enable(char *prompt) #include "uv.h" -void jl_readBuffer(char *base, ssize_t nread) +void jl_readBuffer(unsigned char *base, ssize_t nread) { - char *start = base; + unsigned char *start = base; while(*start != 0 && nread > 0) { rl_stuff_char(*start); start++; diff --git a/ui/repl.h b/ui/repl.h index 3f9ead79a36f5..50e3f4ff22682 100644 --- a/ui/repl.h +++ b/ui/repl.h @@ -31,7 +31,7 @@ extern int ends_with_semicolon(const char *input); extern char *ios_readline(ios_t *s); DLLEXPORT extern void repl_callback_enable(char *prompt); DLLEXPORT extern void jl_stdin_callback(); -DLLEXPORT extern void jl_readBuffer(char *base, ssize_t nread); +DLLEXPORT extern void jl_readBuffer(unsigned char *base, ssize_t nread); DLLEXPORT extern void jl_clear_input(void); #endif // JL_REPL_H