windows.cfg: Improved support for Windows types (ref. https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx ).
This commit is contained in:
parent
21ab5c7591
commit
4e38627a3d
|
@ -66,7 +66,7 @@
|
|||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="DWORDLONG" value="__int64">
|
||||
<platformtype name="DWORDLONG" value="long">
|
||||
<unsigned/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
|
@ -478,6 +478,12 @@
|
|||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="LPHANDLE" value="void">
|
||||
<pointer/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="LPCOLORREF" value="long">
|
||||
<unsigned/>
|
||||
<pointer/>
|
||||
|
@ -622,6 +628,12 @@
|
|||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PCWSTR" value="wchar_t">
|
||||
<const_ptr/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PCTSTR" value="char">
|
||||
<const_ptr/>
|
||||
<platform type="win32A"/>
|
||||
|
@ -631,6 +643,20 @@
|
|||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PDWORD32" value="int">
|
||||
<pointer/>
|
||||
<unsigned/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PDWORD64" value="long">
|
||||
<pointer/>
|
||||
<unsigned/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PDWORD" value="long">
|
||||
<unsigned/>
|
||||
<pointer/>
|
||||
|
@ -723,6 +749,18 @@
|
|||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PDWORDLONG" value="long">
|
||||
<pointer/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="PDWORD_PTR" value="long">
|
||||
<pointer/>
|
||||
<platform type="win32A"/>
|
||||
<platform type="win32W"/>
|
||||
<platform type="win64"/>
|
||||
</platformtype>
|
||||
<platformtype name="QWORD" value="long">
|
||||
<unsigned/>
|
||||
<long/>
|
||||
|
|
|
@ -6223,6 +6223,12 @@ private:
|
|||
"ULONG64 ulong64;"
|
||||
"LPWSTR lpcwstr;"
|
||||
"LPCWSTR lpcwstr;"
|
||||
"LPHANDLE lpHandle;"
|
||||
"PCWSTR pcwStr;"
|
||||
"PDWORDLONG pdWordLong;"
|
||||
"PDWORD_PTR pdWordPtr;"
|
||||
"PDWORD32 pdWord32;"
|
||||
"PDWORD64 pdWord64;"
|
||||
"PFLOAT ptrToFloat;";
|
||||
|
||||
const char expected[] = "int f ; "
|
||||
|
@ -6294,10 +6300,16 @@ private:
|
|||
"unsigned long long ulong64 ; "
|
||||
"wchar_t * lpcwstr ; "
|
||||
"const wchar_t * lpcwstr ; "
|
||||
"void * lpHandle ; "
|
||||
"const wchar_t * pcwStr ; "
|
||||
"long * pdWordLong ; "
|
||||
"long * pdWordPtr ; "
|
||||
"unsigned int * pdWord32 ; "
|
||||
"unsigned long * pdWord64 ; "
|
||||
"float * ptrToFloat ;";
|
||||
|
||||
// These types should be defined the same on all Windows platforms
|
||||
std::string win32A = tokenizeAndStringifyWindows(code, true, true, Settings::Win32A);
|
||||
const std::string win32A = tokenizeAndStringifyWindows(code, true, true, Settings::Win32A);
|
||||
ASSERT_EQUALS(expected, win32A);
|
||||
ASSERT_EQUALS(win32A, tokenizeAndStringifyWindows(code, true, true, Settings::Win32W));
|
||||
ASSERT_EQUALS(win32A, tokenizeAndStringifyWindows(code, true, true, Settings::Win64));
|
||||
|
|
Loading…
Reference in New Issue