Commit 97b1c576 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

constify parser input strings

parent 3be4e913
...@@ -95,8 +95,8 @@ struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,int); ...@@ -95,8 +95,8 @@ struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,int);
int mrb_generate_code(mrb_state*, mrb_ast_node*); int mrb_generate_code(mrb_state*, mrb_ast_node*);
int mrb_compile_file(mrb_state*,FILE*); int mrb_compile_file(mrb_state*,FILE*);
int mrb_compile_string(mrb_state*,char*); int mrb_compile_string(mrb_state*,const char*);
int mrb_compile_nstring(mrb_state*,char*,int); int mrb_compile_nstring(mrb_state*,const char*,int);
#if defined(__cplusplus) #if defined(__cplusplus)
} /* extern "C" { */ } /* extern "C" { */
......
...@@ -4812,7 +4812,7 @@ mrb_compile_file(mrb_state * mrb, FILE *f) ...@@ -4812,7 +4812,7 @@ mrb_compile_file(mrb_state * mrb, FILE *f)
} }
int int
mrb_compile_nstring(mrb_state *mrb, char *s, int len) mrb_compile_nstring(mrb_state *mrb, const char *s, int len)
{ {
parser_state *p; parser_state *p;
int n; int n;
...@@ -4828,7 +4828,7 @@ mrb_compile_nstring(mrb_state *mrb, char *s, int len) ...@@ -4828,7 +4828,7 @@ mrb_compile_nstring(mrb_state *mrb, char *s, int len)
} }
int int
mrb_compile_string(mrb_state *mrb, char *s) mrb_compile_string(mrb_state *mrb, const char *s)
{ {
return mrb_compile_nstring(mrb, s, strlen(s)); return mrb_compile_nstring(mrb, s, strlen(s));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment