summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl/value.rb
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-07 09:45:02 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-07 09:45:02 +0000
commit7bcc13550437e1c4198fbf6212abc8e7672e1adb (patch)
treecf1236e58aba577543c8788adbca32293d2d4ad4 /ext/dl/lib/dl/value.rb
parent48a86f5ffafb2744fac609714fee74f1872df84b (diff)
Improved DL::Handle#sym.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib/dl/value.rb')
-rw-r--r--ext/dl/lib/dl/value.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/dl/lib/dl/value.rb b/ext/dl/lib/dl/value.rb
index 1357106a42..aa7e0dd325 100644
--- a/ext/dl/lib/dl/value.rb
+++ b/ext/dl/lib/dl/value.rb
@@ -50,6 +50,13 @@ module DL
case arg
when CPtr
return arg.to_i
+ when IO
+ case ty
+ when TYPE_VOIDP
+ return CPtr[arg].to_i
+ else
+ return arg.to_i
+ end
when Function
if( block )
arg.bind_at_call(&block)