Skip to content

Commit

Permalink
Remove unused functions from struct rb_parser_config_struct
Browse files Browse the repository at this point in the history
  • Loading branch information
yui-knk committed Apr 23, 2024
1 parent c7d9376 commit 84c17d9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions ruby_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ intern3(const char *name, long len, void *enc)
return rb_intern3(name, len, (rb_encoding *)enc);
}

static void *
enc_compatible(VALUE str1, VALUE str2)
{
return (void *)rb_enc_compatible(str1, str2);
}

static VALUE
enc_from_encoding(void *enc)
{
Expand Down Expand Up @@ -442,7 +436,6 @@ static const rb_parser_config_t rb_global_parser_config = {
.enc_isspace = enc_isspace,
.enc_coderange_7bit = ENC_CODERANGE_7BIT,
.enc_coderange_unknown = ENC_CODERANGE_UNKNOWN,
.enc_compatible = enc_compatible,
.enc_from_encoding = enc_from_encoding,
.encoding_is_ascii8bit = encoding_is_ascii8bit,
.usascii_encoding = usascii_encoding,
Expand Down
1 change: 0 additions & 1 deletion rubyparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,6 @@ typedef struct rb_parser_config_struct {
int (*enc_find_index)(const char *name);
rb_encoding *(*enc_from_index)(int idx);
int (*enc_isspace)(OnigCodePoint c, rb_encoding *enc);
rb_encoding *(*enc_compatible)(VALUE str1, VALUE str2);
VALUE (*enc_from_encoding)(rb_encoding *enc);
int (*encoding_is_ascii8bit)(VALUE obj);
rb_encoding *(*usascii_encoding)(void);
Expand Down
1 change: 0 additions & 1 deletion universal_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
#define rb_enc_isspace p->config->enc_isspace
#define ENC_CODERANGE_7BIT p->config->enc_coderange_7bit
#define ENC_CODERANGE_UNKNOWN p->config->enc_coderange_unknown
#define rb_enc_compatible p->config->enc_compatible
#define rb_enc_from_encoding p->config->enc_from_encoding
#define ENCODING_IS_ASCII8BIT p->config->encoding_is_ascii8bit
#define rb_usascii_encoding p->config->usascii_encoding
Expand Down

0 comments on commit 84c17d9

Please sign in to comment.