Question about wide-char string literals

Stefan Dösinger stefandoesinger at gmail.com
Fri Nov 13 01:45:47 CST 2020



> Am 13.11.2020 um 10:35 schrieb Alex Henrie <alexhenrie24 at gmail.com>:

> Wouldn't that only be a problem if the module tried to call a wcs
> function like wcslen, which we can't do right now anyway because wcs
> functions expect an array of 4-byte characters and all the wide-char
> functions in the Win32 API use 2-byte characters? Most system
> functions don't use wchar_t at all and thus can be safely called no
> matter how it's defined.


Possibly, but it seems fragile and too high a cost to get L"" literals.

You don't know what -fshort-wchar will do to the headers and inline functions in there. And having Wine's WCHAR and host wchar_t separate is a nice way to get compiler warnings if we accidentally mix them.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201113/79b46429/attachment.sig>


More information about the wine-devel mailing list