remove size_t from parser

This commit is contained in:
Yukihiro Matsumoto
2012-07-03 14:27:34 +09:00
parent 660f64b1d0
commit 3be4e91376
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -91,12 +91,12 @@ void mrb_parser_parse(struct mrb_parser_state*);
/* utility functions */
struct mrb_parser_state* mrb_parse_file(mrb_state*,FILE*);
struct mrb_parser_state* mrb_parse_string(mrb_state*,const char*);
struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,size_t);
struct mrb_parser_state* mrb_parse_nstring(mrb_state*,const char*,int);
int mrb_generate_code(mrb_state*, mrb_ast_node*);
int mrb_compile_file(mrb_state*,FILE*);
int mrb_compile_string(mrb_state*,char*);
int mrb_compile_nstring(mrb_state*,char*,size_t);
int mrb_compile_nstring(mrb_state*,char*,int);
#if defined(__cplusplus)
} /* extern "C" { */
+5 -5
View File
@@ -686,7 +686,7 @@ new_float(parser_state *p, const char *s)
// (:str . (s . len))
static node*
new_str(parser_state *p, const char *s, size_t len)
new_str(parser_state *p, const char *s, int len)
{
return cons((node*)NODE_STR, cons((node*)strndup(s, len), (node*)len));
}
@@ -2961,7 +2961,7 @@ static void
yyerror(parser_state *p, const char *s)
{
char* c;
size_t n;
int n;
if (! p->capture_errors) {
if (p->filename) {
@@ -2995,7 +2995,7 @@ static void
yywarn(parser_state *p, const char *s)
{
char* c;
size_t n;
int n;
if (! p->capture_errors) {
if (p->filename) {
@@ -4774,7 +4774,7 @@ mrb_parse_file(mrb_state *mrb, FILE *f)
}
parser_state*
mrb_parse_nstring(mrb_state *mrb, const char *s, size_t len)
mrb_parse_nstring(mrb_state *mrb, const char *s, int len)
{
parser_state *p;
@@ -4812,7 +4812,7 @@ mrb_compile_file(mrb_state * mrb, FILE *f)
}
int
mrb_compile_nstring(mrb_state *mrb, char *s, size_t len)
mrb_compile_nstring(mrb_state *mrb, char *s, int len)
{
parser_state *p;
int n;