Skip to content

Commit

Permalink
Using rb_ruby_ast_data_get function
Browse files Browse the repository at this point in the history
S-H-GAMELINKS committed Sep 6, 2024
1 parent 652ebe1 commit cd6b26d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ext/kanayago/kanayago.c
Original file line number Diff line number Diff line change
@@ -405,9 +405,7 @@ kanayago_parse(VALUE self, VALUE source)

VALUE vast = rb_parser_compile_string(vparser, "main", source, 0);

rb_ast_t *ast;

TypedData_Get_Struct(vast, rb_ast_t, &ast_data_type, ast);
rb_ast_t *ast = rb_ruby_ast_data_get(vast);

return ast_to_hash(ast->body.root);
}

0 comments on commit cd6b26d

Please sign in to comment.