diff options
author | Peter Zhu <peter@peterzhu.ca> | 2024-02-20 15:58:10 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2024-02-21 11:33:05 -0500 |
commit | 330830dd1a44b6e497250a14d93efae6fa363f82 (patch) | |
tree | 864fc9a6ba29c91fcbeb0c9c439e99b7d7fb0a04 /ruby_parser.c | |
parent | 2e6f8554f8c4ec12f620f31d4a110066ee76bfbe (diff) |
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.
Diffstat (limited to 'ruby_parser.c')
-rw-r--r-- | ruby_parser.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ruby_parser.c b/ruby_parser.c index 7b6f0dfbc3..c4b4ffc1a3 100644 --- a/ruby_parser.c +++ b/ruby_parser.c @@ -446,8 +446,7 @@ ruby_vm_frozen_core(void) static rb_ast_t * ast_new(VALUE nb) { - rb_ast_t *ast = (rb_ast_t *)rb_imemo_new(imemo_ast, 0, 0, 0, nb); - return ast; + return IMEMO_NEW(rb_ast_t, imemo_ast, nb); } static VALUE |