mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
7 lines
112 B
C
7 lines
112 B
C
|
|
#if !defined(__cplusplus)
|
|
typedef short wchar_t;
|
|
#endif
|
|
typedef wchar_t WCHAR;
|
|
#define UNICODE_NULL ((WCHAR)0)
|