summaryrefslogtreecommitdiff
path: root/dmyenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmyenc.c')
-rw-r--r--dmyenc.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/dmyenc.c b/dmyenc.c
index 7e006e826c..4771841281 100644
--- a/dmyenc.c
+++ b/dmyenc.c
@@ -1,3 +1,17 @@
+// This file is used by dynamically-linked ruby, which has no
+// statically-linked encodings other than the builtin encodings.
+//
+// - miniruby does not use this Init_enc. Instead, "miniinit.c"
+// provides Init_enc, which defines only the builtin encodings.
+//
+// - Dynamically-linked ruby uses this Init_enc, which requires
+// "enc/encdb.so" to load the builtin encodings and set up the
+// optional encodings.
+//
+// - Statically-linked ruby does not use this Init_enc. Instead,
+// "enc/encinit.c" (which is a generated file) defines Init_enc,
+// which activates the encodings.
+
#define require(name) ruby_require_internal(name, (unsigned int)sizeof(name)-1)
int ruby_require_internal(const char *, int);
@@ -5,6 +19,6 @@ void
Init_enc(void)
{
if (require("enc/encdb.so") == 1) {
- require("enc/trans/transdb.so");
+ require("enc/trans/transdb.so");
}
}