diff options
author | Thomas E. Enebo <[email protected]> | 2023-08-03 14:15:26 -0400 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-08-16 17:47:32 -0700 |
commit | 1e0749e0328ebb7a670450d0375626b7adc789fb (patch) | |
tree | 928066c281f6954aa1edc0f5694459ec14128636 /yarp/extension.c | |
parent | 0b6a26abff1a15103f4a3080619ea28b40774324 (diff) |
[ruby/yarp] Addressed review comments.
Missing any tests and in fact this is untested so still a WIP.
https://github.com/ruby/yarp/commit/5411abd651
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8226
Diffstat (limited to 'yarp/extension.c')
-rw-r--r-- | yarp/extension.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yarp/extension.c b/yarp/extension.c index 4f2065a81b..e6ef3f7648 100644 --- a/yarp/extension.c +++ b/yarp/extension.c @@ -62,7 +62,7 @@ dump_input(yp_string_t *input, const char *filepath) { yp_parser_t parser; yp_parser_init(&parser, yp_string_source(input), yp_string_length(input), filepath); - yp_node_t *node = yp_parse(&parser, false); + yp_node_t *node = yp_parse(&parser); yp_serialize(&parser, node, &buffer); VALUE result = rb_str_new(buffer.value, buffer.length); @@ -246,7 +246,7 @@ lex_input(yp_string_t *input, const char *filepath) { }; parser.lex_callback = &lex_callback; - yp_node_t *node = yp_parse(&parser, false); + yp_node_t *node = yp_parse(&parser); // Here we need to update the source range to have the correct newline // offsets. We do it here because we've already created the object and given @@ -307,7 +307,7 @@ parse_input(yp_string_t *input, const char *filepath) { yp_parser_t parser; yp_parser_init(&parser, yp_string_source(input), yp_string_length(input), filepath); - yp_node_t *node = yp_parse(&parser, false); + yp_node_t *node = yp_parse(&parser); rb_encoding *encoding = rb_enc_find(parser.encoding.name); VALUE source = yp_source_new(&parser); @@ -437,7 +437,7 @@ memsize(VALUE self, VALUE string) { size_t length = RSTRING_LEN(string); yp_parser_init(&parser, RSTRING_PTR(string), length, NULL); - yp_node_t *node = yp_parse(&parser, false); + yp_node_t *node = yp_parse(&parser); yp_memsize_t memsize; yp_node_memsize(node, &memsize); @@ -463,7 +463,7 @@ profile_file(VALUE self, VALUE filepath) { yp_parser_t parser; yp_parser_init(&parser, yp_string_source(&input), yp_string_length(&input), checked); - yp_node_t *node = yp_parse(&parser, false); + yp_node_t *node = yp_parse(&parser); yp_node_destroy(&parser, node); yp_parser_free(&parser); |