[PATCH 7/7] widl: Fix C++ RuntimeClass string constant declaration.

Jacek Caban jacek at codeweavers.com
Thu Feb 25 07:21:33 CST 2021


On 22.02.2021 10:03, Rémi Bernon wrote:
>       fprintf(header, "#ifndef RUNTIMECLASS_%s_DEFINED\n", c_name);
>       fprintf(header, "#define RUNTIMECLASS_%s_DEFINED\n", c_name);
>       fprintf(header, "#if defined(_MSC_VER) || defined(__MINGW32__)\n");
> +    fprintf(header, "#ifdef __cplusplus\n");
> +    fprintf(header, "extern const DECLSPEC_SELECTANY wchar_t RuntimeClass_%s[] = L\"%s\";\n", c_name, name);
> +    fprintf(header, "#else\n");


I think we want to stick with WCHAR, otherwise you wouldn't be able to 
pass it to Windows APIs. Maybe you could check 
defined(WINE_UNICODE_NATIVE) and use u"" form like we do for __TEXT 
macro in winnt.rh.


Thanks,

Jacek




More information about the wine-devel mailing list