Remove ast_new field from struct rb_parser_config_struct

`ast_new` can be embedded into `rb_ast_new`.
This commit is contained in:
yui-knk 2024-04-28 12:45:30 +09:00 committed by Yuichiro Kaneko
parent 5c3d5c7cdd
commit 29aaf4abe6
3 changed files with 2 additions and 13 deletions

View file

@ -292,14 +292,6 @@ arg_error(void)
return rb_eArgError;
}
static rb_ast_t *
ast_new(node_buffer_t *nb)
{
rb_ast_t *ast = ruby_xcalloc(1, sizeof(rb_ast_t));
ast->node_buffer = nb;
return ast;
}
static VALUE
static_id2sym(ID id)
{
@ -348,8 +340,6 @@ static const rb_parser_config_t rb_global_parser_config = {
.nonempty_memcpy = nonempty_memcpy,
.xmalloc_mul_add = rb_xmalloc_mul_add,
.ast_new = ast_new,
.compile_callback = rb_suppress_tracing,
.reg_named_capture_assign = reg_named_capture_assign,