diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-09 17:47:34 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-06-09 17:47:34 +0000 |
commit | 2d5b7f736518fb343469cd2bee721120309d8dca (patch) | |
tree | 2b087bbd1f6160b6c4b4fb787bc32f96fb889873 /ext/dl/doc | |
parent | d5ceb6ef829a4913e045015ea0deb2269eef9093 (diff) |
* ext/dl: change the callback mechanism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/doc')
-rw-r--r-- | ext/dl/doc/dl.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/dl/doc/dl.txt b/ext/dl/doc/dl.txt index c3d06a6efb..114baafcb7 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 |