summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2021-07-27 09:23:47 +0900
committerNobuyoshi Nakada <[email protected]>2021-07-27 15:40:27 +0900
commit537e8245613e8f4ccf62f856dd1dff4a012ed395 ()
tree746d9d7de145ab879a68d720057c55efe9d63da2 /transcode.c
parent6329da588b5a27834e3a73c1e08bf54356033757 (diff)
Don't redefine #rb_intern over and over again
Notes: Merged: https://.com/ruby/ruby/pull/4684
-rw-r--r--transcode.c49
1 files changed, 24 insertions, 25 deletions
@@ -4421,38 +4421,37 @@ ecerr_incomplete_input(VALUE self)
* correspond with a known converter.
*/
-#undef rb_intern
void
Init_transcode(void)
{
transcoder_table = st_init_strcasetable();
- sym_invalid = ID2SYM(rb_intern("invalid"));
- sym_undef = ID2SYM(rb_intern("undef"));
- sym_replace = ID2SYM(rb_intern("replace"));
- sym_fallback = ID2SYM(rb_intern("fallback"));
- sym_xml = ID2SYM(rb_intern("xml"));
- sym_text = ID2SYM(rb_intern("text"));
- sym_attr = ID2SYM(rb_intern("attr"));
-
- sym_invalid_byte_sequence = ID2SYM(rb_intern("invalid_byte_sequence"));
- sym_undefined_conversion = ID2SYM(rb_intern("undefined_conversion"));
- sym_destination_buffer_full = ID2SYM(rb_intern("destination_buffer_full"));
- sym_source_buffer_empty = ID2SYM(rb_intern("source_buffer_empty"));
- sym_finished = ID2SYM(rb_intern("finished"));
- sym_after_output = ID2SYM(rb_intern("after_output"));
- sym_incomplete_input = ID2SYM(rb_intern("incomplete_input"));
- sym_universal_newline = ID2SYM(rb_intern("universal_newline"));
- sym_crlf_newline = ID2SYM(rb_intern("crlf_newline"));
- sym_cr_newline = ID2SYM(rb_intern("cr_newline"));
- sym_partial_input = ID2SYM(rb_intern("partial_input"));
#ifdef ENABLE_ECONV_NEWLINE_OPTION
- sym_newline = ID2SYM(rb_intern("newline"));
- sym_universal = ID2SYM(rb_intern("universal"));
- sym_crlf = ID2SYM(rb_intern("crlf"));
- sym_cr = ID2SYM(rb_intern("cr"));
- sym_lf = ID2SYM(rb_intern("lf"));
#endif
InitVM(transcode);