[PATCH 4/4] widl: Generate WinRT runtimeclass name constants.

Dmitry Timoshkov dmitry at baikal.ru
Fri Jan 29 02:56:12 CST 2021


Rémi Bernon <rbernon at codeweavers.com> wrote:

> @@ -1710,6 +1711,10 @@ static void write_runtimeclass(FILE *header, type_t *runtimeclass)
>      if (contract) write_apicontract_guard_start(header, contract);
>      fprintf(header, "#ifndef RUNTIMECLASS_%s_DEFINED\n", c_name);
>      fprintf(header, "#define RUNTIMECLASS_%s_DEFINED\n", c_name);
> +    /* FIXME: MIDL generates extern const here but GCC warns if extern is initialized */
> +    fprintf(header, "/*extern*/ const DECLSPEC_SELECTANY WCHAR RuntimeClass_%s[] = {", c_name);
> +    for (i = 0, len = strlen(name); i < len; ++i) fprintf(header, "'%c',", name[i]);
> +    fprintf(header, "0};\n");

As I pointed out in https://bugs.winehq.org/show_bug.cgi?id=50559 this won't
compile with clang.

-- 
Dmitry.



More information about the wine-devel mailing list