summaryrefslogtreecommitdiff
path: root/dmyext.c
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2024-02-21 17:14:49 +0900
committerYusuke Endoh <[email protected]>2024-02-21 17:57:48 +0900
commitb1431ce427eb193f45fe536f1fdfdf22bbe02e3d (patch)
tree7308e1f2c269c3740828d8d1d8019582b73ce26d /dmyext.c
parent6ecb14df2cda223e2280891150b3f41c1eb2edf0 (diff)
Add comments to dmydln.c, dmyenc.c, and dmyext.c
They are used conditionally in miniruby, dynamically-linked ruby, and statically-linked ruby (--with-static-linked-ext). I asked @nobu about the conditions. and I leave comments because the conditions are insanely difficult.
Diffstat (limited to 'dmyext.c')
-rw-r--r--dmyext.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dmyext.c b/dmyext.c
index 4d273f7faf..0020246529 100644
--- a/dmyext.c
+++ b/dmyext.c
@@ -1,3 +1,8 @@
+// This file is used by dynamically-linked ruby and miniruby.
+// miniruby uses this Init_ext, which does nothing. It does not support require'ing extension libraries.
+// Dynamically-linked ruby uses this Init_ext, which does nothing. It loads extension libraries by dlopen, etc.
+// Statically-linked ruby does not use this Init_ext. Instead, "ext/extinit.c" (which is a generated file) defines Init_ext, which activates the (statically-linked) extension libraries.
+
void
Init_ext(void)
{