summaryrefslogtreecommitdiff
path: root/transcode.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 03:38:10 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-03 03:38:10 (GMT)
commit876bfc6b4ee6c0ddacbeff328dc428889d789a6b (patch)
tree88bb8bfaea318a50351ce4db76ac08683214eb95 /transcode.c
parent255adda52fcd161f62fd75eec9504200e6b6eea8 (diff)
Init functions don't need ID caches
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/transcode.c b/transcode.c
index 0182a20..b640008 100644
--- a/transcode.c
+++ b/transcode.c
@@ -4388,13 +4388,10 @@ ecerr_incomplete_input(VALUE self)
* correspond with a known converter.
*/
+#undef rb_intern
void
Init_transcode(void)
{
- rb_eUndefinedConversionError = rb_define_class_under(rb_cEncoding, "UndefinedConversionError", rb_eEncodingError);
- rb_eInvalidByteSequenceError = rb_define_class_under(rb_cEncoding, "InvalidByteSequenceError", rb_eEncodingError);
- rb_eConverterNotFoundError = rb_define_class_under(rb_cEncoding, "ConverterNotFoundError", rb_eEncodingError);
-
transcoder_table = st_init_strcasetable();
sym_invalid = ID2SYM(rb_intern("invalid"));
@@ -4426,6 +4423,16 @@ Init_transcode(void)
sym_lf = ID2SYM(rb_intern("lf"));
#endif
+ InitVM(transcode);
+}
+
+void
+InitVM_transcode(void)
+{
+ rb_eUndefinedConversionError = rb_define_class_under(rb_cEncoding, "UndefinedConversionError", rb_eEncodingError);
+ rb_eInvalidByteSequenceError = rb_define_class_under(rb_cEncoding, "InvalidByteSequenceError", rb_eEncodingError);
+ rb_eConverterNotFoundError = rb_define_class_under(rb_cEncoding, "ConverterNotFoundError", rb_eEncodingError);
+
rb_define_method(rb_cString, "encode", str_encode, -1);
rb_define_method(rb_cString, "encode!", str_encode_bang, -1);