mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: map wchar_t to UInt16 on Windows
This is an ABI breaking change for Windows. `WCHAR` on Windows is mapped to `short` (`-fshort-wchar` makes it `unsigned short`). When C++ interop is enabled, `WCHAR` will be mapped to `wchar_t` which is then mapped to `short` (or `unsigned short` if `-fshort-wchar` is specified). Correct the mapping type to get the desired behaviour.
This commit is contained in:
committed by
GitHub
parent
879ffde591
commit
d61b8855e9
6
test/ClangImporter/Inputs/unicode/unicode.h
Normal file
6
test/ClangImporter/Inputs/unicode/unicode.h
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
typedef short wchar_t;
|
||||
#endif
|
||||
typedef wchar_t WCHAR;
|
||||
#define UNICODE_NULL ((WCHAR)0)
|
||||
Reference in New Issue
Block a user