-
Notifications
You must be signed in to change notification settings - Fork 10.5k
stdlib: map wchar_t
to UInt16
on Windows
#69105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
@swift-ci please test |
@swift-ci please test Windows platform |
@compnerd is this already on main? |
@stephentyrone yeap! |
Can you link to the PR against main here, please? |
This is dependent on #69328 |
Explanation: Adjust the mapping for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! This is something we should probably note in the ChangeLog, since it's going to have an impact on Windows users
@swift-ci please test Windows platform |
This is an ABI breaking change for Windows.
WCHAR
on Windows is mapped toshort
(-fshort-wchar
makes itunsigned short
). When C++ interop is enabled,WCHAR
will be mapped towchar_t
which is then mapped toshort
(orunsigned short
if-fshort-wchar
is specified). Correct the mapping type to get the desired behaviour.