mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove ast_new
field from struct rb_parser_config_struct
`ast_new` can be embedded into `rb_ast_new`.
This commit is contained in:
parent
5c3d5c7cdd
commit
29aaf4abe6
3 changed files with 2 additions and 13 deletions
3
node.c
3
node.c
|
@ -301,8 +301,9 @@ rb_ast_t *
|
|||
rb_ast_new(const rb_parser_config_t *config)
|
||||
{
|
||||
node_buffer_t *nb = rb_node_buffer_new(config);
|
||||
rb_ast_t *ast = config->ast_new(nb);
|
||||
rb_ast_t *ast = (rb_ast_t *)config->calloc(1, sizeof(rb_ast_t));
|
||||
ast->config = config;
|
||||
ast->node_buffer = nb;
|
||||
return ast;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue