summaryrefslogtreecommitdiffstats
path: root/ext/dl/doc
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-09 17:47:34 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-09 17:47:34 +0000
commit6ff6e8758d4125174a19b49029dc9499f0c6b8dc (patch)
tree2b087bbd1f6160b6c4b4fb787bc32f96fb889873 /ext/dl/doc
parent717dfa48d53a58f9574755de3d4b997e4dd6c828 (diff)
* ext/dl: change the callback mechanism.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/doc')
-rw-r--r--ext/dl/doc/dl.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/dl/doc/dl.txt b/ext/dl/doc/dl.txt
index c3d06a6ef..114baafcb 100644
--- a/ext/dl/doc/dl.txt
+++ b/ext/dl/doc/dl.txt
@@ -52,9 +52,9 @@ struct and union which are defined in "dl/struct.rb" as follows:
"long tv_uses",
]
end
- val = LIBC::Timeval.alloc # allocate the memory.
+ val = LIBC::Timeval.malloc # allocate the memory.
-The above example uses LIBC::Timeval.alloc, since we use LIBC::Timeval.new(ptr)
+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
malloc().
@@ -244,10 +244,10 @@ the type of each argument.
p : a mutable object (void *)
0 : void function (this must be a first character of the prototype)
-the cbtype consists of type specifiers 0, I, L, D and P.
+the cbtype consists of type specifiers 0, C, I, H, L, F, D, S and P.
for example:
- DL.set_callback('IPP',0){|ptr1,ptr2|
+ DL.callback('IPP'){|ptr1,ptr2|
str1 = ptr1.ptr.to_s
str2 = ptr2.ptr.to_s
return str1 <=> str2