1 files changed, 5 insertions, 6 deletions
diff --git a/ext/dl/doc/dl.txt b/ext/dl/doc/dl.txt
index 4557d6d303..44499bba15 100644
@@ -47,17 +47,16 @@ struct and union which are defined in "dl/struct.rb" as follows:
- Timeval = struct [ # define the timeval structure.
+ Timeval = struct [ # define timeval structure.
- val = LIBC::Timeval.malloc # allocate the memory.
+ val = LIBC::Timeval.malloc # allocate memory.
-The above example uses LIBC::Timeval.malloc, since we use LIBC::Timeval.new(ptr)
-to wrap the given PtrData object which is, for example, created by DL::malloc().
-DL::malloc() is a function to allocate a memory by using the C library function
+Notice that the above example takes LIBC::Timeval.malloc to allocate memory,
+rather than LIBC::Timeval.new. It is because DL::Timeval.new is for wrapping
+an object, PtrData, which has already been created.
We can define a callback using the module function "callback" as follows: