Tempfile document updated.
[ruby.git] / dmyenc.c
blob47718412814c6a7c59d51dc2bc02b3b7923b344c
1 // This file is used by dynamically-linked ruby, which has no
2 // statically-linked encodings other than the builtin encodings.
3 //
4 // - miniruby does not use this Init_enc. Instead, "miniinit.c"
5 // provides Init_enc, which defines only the builtin encodings.
6 //
7 // - Dynamically-linked ruby uses this Init_enc, which requires
8 // "enc/encdb.so" to load the builtin encodings and set up the
9 // optional encodings.
11 // - Statically-linked ruby does not use this Init_enc. Instead,
12 // "enc/encinit.c" (which is a generated file) defines Init_enc,
13 // which activates the encodings.
15 #define require(name) ruby_require_internal(name, (unsigned int)sizeof(name)-1)
16 int ruby_require_internal(const char *, int);
18 void
19 Init_enc(void)
21 if (require("enc/encdb.so") == 1) {
22 require("enc/trans/transdb.so");