* ext/dl/lib/types.rb: Win64 support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2012-02-09 02:32:58 +00:00
parent 7bde0843a2
commit 70b504badb
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Thu Feb 9 11:32:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
* ext/dl/lib/types.rb: Win64 support.
Thu Feb 9 04:12:29 2012 NARUSE, Yui <naruse@ruby-lang.org> Thu Feb 9 04:12:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
* test/pathname/test_pathname.rb: not read but binread. * test/pathname/test_pathname.rb: not read but binread.

View File

@ -7,6 +7,8 @@ module DL
# * BOOL # * BOOL
# * BYTE # * BYTE
# * DWORD # * DWORD
# * DWORD32
# * DWORD64
# * HANDLE # * HANDLE
# * HDC # * HDC
# * HINSTANCE # * HINSTANCE
@ -27,6 +29,8 @@ module DL
m.module_eval{ m.module_eval{
typealias "DWORD", "unsigned long" typealias "DWORD", "unsigned long"
typealias "PDWORD", "unsigned long *" typealias "PDWORD", "unsigned long *"
typealias "DWORD32", "unsigned long"
typealias "DWORD64", "unsigned long long"
typealias "WORD", "unsigned short" typealias "WORD", "unsigned short"
typealias "PWORD", "unsigned short *" typealias "PWORD", "unsigned short *"
typealias "BOOL", "int" typealias "BOOL", "int"
@ -36,7 +40,11 @@ module DL
typealias "UINT", "unsigned int" typealias "UINT", "unsigned int"
typealias "ULONG", "unsigned long" typealias "ULONG", "unsigned long"
typealias "UCHAR", "unsigned char" 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 "PHANDLE", "void*"
typealias "PVOID", "void*" typealias "PVOID", "void*"
typealias "LPCSTR", "char*" typealias "LPCSTR", "char*"