mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Add IMEMO_NEW
Rather than exposing that an imemo has a flag and four fields, this changes the implementation to only expose one field (the klass) and fills the rest with 0. The type will have to fill in the values themselves.
This commit is contained in:
parent
2e6f8554f8
commit
330830dd1a
12 changed files with 69 additions and 33 deletions
3
node.c
3
node.c
|
@ -344,8 +344,7 @@ rb_ast_t *
|
|||
rb_ast_new(void)
|
||||
{
|
||||
node_buffer_t *nb = rb_node_buffer_new();
|
||||
rb_ast_t *ast = (rb_ast_t *)rb_imemo_new(imemo_ast, 0, 0, 0, (VALUE)nb);
|
||||
return ast;
|
||||
return IMEMO_NEW(rb_ast_t, imemo_ast, (VALUE)nb);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue