mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Move encoding object conversion outside of parser
Reduce the parser's dependence on `VALUE` and `rb_enc_from_encoding`.
This commit is contained in:
parent
e15a1920ca
commit
33929ef995
4 changed files with 5 additions and 5 deletions
|
@ -827,7 +827,7 @@ rb_parser_encoding(VALUE vparser)
|
|||
struct ruby_parser *parser;
|
||||
|
||||
TypedData_Get_Struct(vparser, struct ruby_parser, &ruby_parser_data_type, parser);
|
||||
return rb_ruby_parser_encoding(parser->parser_params);
|
||||
return rb_enc_from_encoding(rb_ruby_parser_encoding(parser->parser_params));
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue