summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-09 02:32:58 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-09 02:32:58 +0000
commit70b504badbf9a0852fe73af26bbd602619286fc7 (patch)
treeeea0440e9a5df627d90f81241e6109c3e830b9cb /ext/dl
parent7bde0843a2ce0680d1cefb8f4acea6ea56491008 (diff)
* ext/dl/lib/types.rb: Win64 support.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/lib/dl/types.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/dl/lib/dl/types.rb b/ext/dl/lib/dl/types.rb
index c79f74f..3dfa408 100644
--- a/ext/dl/lib/dl/types.rb
+++ b/ext/dl/lib/dl/types.rb
@@ -7,6 +7,8 @@ module DL
# * BOOL
# * BYTE
# * DWORD
+ # * DWORD32
+ # * DWORD64
# * HANDLE
# * HDC
# * HINSTANCE
@@ -27,6 +29,8 @@ module DL
m.module_eval{
typealias "DWORD", "unsigned long"
typealias "PDWORD", "unsigned long *"
+ typealias "DWORD32", "unsigned long"
+ typealias "DWORD64", "unsigned long long"
typealias "WORD", "unsigned short"
typealias "PWORD", "unsigned short *"
typealias "BOOL", "int"
@@ -36,7 +40,11 @@ module DL
typealias "UINT", "unsigned int"
typealias "ULONG", "unsigned long"
typealias "UCHAR", "unsigned char"
- typealias "HANDLE", "unsigned long"
+ if [nil].pack('p').bytesize == 8
+ typealias "HANDLE", "unsigned long long"
+ else
+ typealias "HANDLE", "unsigned long"
+ end
typealias "PHANDLE", "void*"
typealias "PVOID", "void*"
typealias "LPCSTR", "char*"