Make some functions to be static

These functions are used only in ast.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yui-knk 2018-11-11 00:55:19 +00:00
parent afa1c6a2df
commit ab97298a22

14
ast.c
View File

@ -52,9 +52,9 @@ ast_new_internal(rb_ast_t *ast, NODE *node)
return obj; return obj;
} }
VALUE rb_ast_parse_str(VALUE str); static VALUE rb_ast_parse_str(VALUE str);
VALUE rb_ast_parse_file(VALUE path); static VALUE rb_ast_parse_file(VALUE path);
VALUE rb_ast_parse_array(VALUE array); static VALUE rb_ast_parse_array(VALUE array);
static VALUE static VALUE
ast_parse_new(void) ast_parse_new(void)
@ -91,7 +91,7 @@ rb_ast_s_parse(VALUE module, VALUE str)
return rb_ast_parse_str(str); return rb_ast_parse_str(str);
} }
VALUE static VALUE
rb_ast_parse_str(VALUE str) rb_ast_parse_str(VALUE str)
{ {
rb_ast_t *ast = 0; rb_ast_t *ast = 0;
@ -120,7 +120,7 @@ rb_ast_s_parse_file(VALUE module, VALUE path)
return rb_ast_parse_file(path); return rb_ast_parse_file(path);
} }
VALUE static VALUE
rb_ast_parse_file(VALUE path) rb_ast_parse_file(VALUE path)
{ {
VALUE f; VALUE f;
@ -135,7 +135,7 @@ rb_ast_parse_file(VALUE path)
return ast_parse_done(ast); return ast_parse_done(ast);
} }
VALUE static VALUE
lex_array(VALUE array, int index) lex_array(VALUE array, int index)
{ {
VALUE str = rb_ary_entry(array, index); VALUE str = rb_ary_entry(array, index);
@ -148,7 +148,7 @@ lex_array(VALUE array, int index)
return str; return str;
} }
VALUE static VALUE
rb_ast_parse_array(VALUE array) rb_ast_parse_array(VALUE array)
{ {
rb_ast_t *ast = 0; rb_ast_t *ast = 0;