Remove SYM2ID for Parser
authorS-H-GAMELINKS <[email protected]>
Sat, 4 Jan 2025 04:42:22 +0000 (4 13:42 +0900)
committerNobuyoshi Nakada <[email protected]>
Mon, 6 Jan 2025 11:17:47 +0000 (6 20:17 +0900)
Ruby Parser not used SYM2ID.
And sym2id property can be removed from Universal Parser.

ruby_parser.c
rubyparser.h
universal_parser.c

index 2fbba41..c14b989 100644 (file)
@@ -362,7 +362,6 @@ static const rb_parser_config_t rb_global_parser_config = {
     .id2name = rb_id2name,
     .id2str = rb_id2str,
     .id2sym = rb_id2sym,
-    .sym2id = rb_sym2id,
 
     .str_catf = rb_str_catf,
     .str_cat_cstr = rb_str_cat_cstr,
index 0d3a04c..b564523 100644 (file)
@@ -1233,7 +1233,6 @@ typedef struct rb_parser_config_struct {
     const char *(*id2name)(ID id);
     VALUE (*id2str)(ID id);
     VALUE (*id2sym)(ID x);
-    ID (*sym2id)(VALUE sym);
 
     /* String */
     RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, 2, 3)
index a381f9a..8f499cb 100644 (file)
 #define rb_id2str                p->config->id2str
 #undef ID2SYM
 #define ID2SYM                   p->config->id2sym
-#undef SYM2ID
-#define SYM2ID                   p->config->sym2id
 
 #define rb_str_catf                       p->config->str_catf
 #undef rb_str_cat_cstr