Skip to content

Commit

Permalink
Add ary_modify property for Universal Parser
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed Dec 28, 2023
1 parent 26172c9 commit 73fa322
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions ruby_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ rb_parser_config_initialize(rb_parser_config_t *config)
config->ary_join = rb_ary_join;
config->ary_reverse = rb_ary_reverse;
config->ary_clear = rb_ary_clear;
config->ary_modify = rb_ary_modify;
config->array_len = rb_array_len;
config->array_aref = RARRAY_AREF;

Expand Down
1 change: 1 addition & 0 deletions rubyparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ typedef struct rb_parser_config_struct {
VALUE (*ary_join)(VALUE ary, VALUE sep);
VALUE (*ary_reverse)(VALUE ary);
VALUE (*ary_clear)(VALUE ary);
void (*ary_modify)(VALUE ary);
long (*array_len)(VALUE a);
VALUE (*array_aref)(VALUE, long);

Expand Down
1 change: 1 addition & 0 deletions universal_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ struct rb_imemo_tmpbuf_struct {
#define rb_ary_join p->config->ary_join
#define rb_ary_reverse p->config->ary_reverse
#define rb_ary_clear p->config->ary_clear
#define rb_ary_modify p->config->ary_modify
#undef RARRAY_LEN
#define RARRAY_LEN p->config->array_len
#define RARRAY_AREF p->config->array_aref
Expand Down

0 comments on commit 73fa322

Please sign in to comment.