ruby-changes:66249
From: Sutou <ko1@a...>
Date: Tue, 18 May 2021 12:49:02 +0900 (JST)
Subject: [ruby-changes:66249] 8758b07b1e (master): [ruby/fiddle] Fix more Win32Types definitions
https://git.ruby-lang.org/ruby.git/commit/?id=8758b07b1e From 8758b07b1e4fd636dffb4b442388a3033c63d4b5 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei <kou@c...> Date: Tue, 29 Dec 2020 05:18:33 +0900 Subject: [ruby/fiddle] Fix more Win32Types definitions https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types https://github.com/ruby/fiddle/commit/805c1a595a --- ext/fiddle/lib/fiddle/types.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/ext/fiddle/lib/fiddle/types.rb b/ext/fiddle/lib/fiddle/types.rb index 298a5e1..3ea7936 100644 --- a/ext/fiddle/lib/fiddle/types.rb +++ b/ext/fiddle/lib/fiddle/types.rb @@ -27,25 +27,26 @@ module Fiddle https://github.com/ruby/ruby/blob/trunk/ext/fiddle/lib/fiddle/types.rb#L27 # * WORD module Win32Types def included(m) # :nodoc: + # https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types m.module_eval{ typealias "DWORD", "unsigned long" - typealias "PDWORD", "unsigned long *" - typealias "DWORD32", "unsigned long" - typealias "DWORD64", "unsigned long long" + typealias "PDWORD", "DWORD *" + typealias "DWORD32", "uint32_t" + typealias "DWORD64", "uint64_t" typealias "WORD", "unsigned short" - typealias "PWORD", "unsigned short *" + typealias "PWORD", "WORD *" typealias "BOOL", "int" - typealias "ATOM", "int" + typealias "ATOM", "WORD" typealias "BYTE", "unsigned char" - typealias "PBYTE", "unsigned char *" + typealias "PBYTE", "BYTE *" typealias "UINT", "unsigned int" typealias "ULONG", "unsigned long" typealias "UCHAR", "unsigned char" - typealias "HANDLE", "uintptr_t" - typealias "PHANDLE", "void*" - typealias "PVOID", "void*" - typealias "LPCSTR", "const char*" - typealias "LPSTR", "char*" + typealias "HANDLE", "PVOID" + typealias "PHANDLE", "HANDLE *" + typealias "PVOID", "void *" + typealias "LPCSTR", "const char *" + typealias "LPSTR", "char *" typealias "HINSTANCE", "HANDLE" typealias "HDC", "HANDLE" typealias "HWND", "HANDLE" -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/