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 989a235 commit 5f2745f
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 int
encoding_is_ascii8bit(VALUE obj)
{
return ENCODING_IS_ASCII8BIT(obj);
}

static void *
usascii_encoding(void)
{
Expand Down Expand Up @@ -430,7 +424,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,
.encoding_is_ascii8bit = encoding_is_ascii8bit,
.usascii_encoding = usascii_encoding,
.enc_coderange_broken = ENC_CODERANGE_BROKEN,
.enc_mbminlen = enc_mbminlen,
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);
int (*encoding_is_ascii8bit)(VALUE obj);
rb_encoding *(*usascii_encoding)(void);
int enc_coderange_broken;
int (*enc_mbminlen)(rb_encoding *enc);
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 ENCODING_IS_ASCII8BIT p->config->encoding_is_ascii8bit
#define rb_usascii_encoding p->config->usascii_encoding

#define rb_local_defined p->config->local_defined
Expand Down

0 comments on commit 5f2745f

Please sign in to comment.