[PATCH 3/5] widl: Support WinRT mta threading attribute parsing.

Jacek Caban jacek at codeweavers.com
Mon Jan 25 05:17:20 CST 2021


Hi Rémi,


On 19/01/2021 14:04, Rémi Bernon wrote:
> diff --git a/tools/widl/parser.l b/tools/widl/parser.l
> index 01c6f800a08..067966a85d4 100644
> --- a/tools/widl/parser.l
> +++ b/tools/widl/parser.l
> @@ -385,6 +385,7 @@ static const struct keyword attr_keywords[] =
>   	{"marshaling_behavior",         tMARSHALINGBEHAVIOR,        1},
>   	{"maybe",                       tMAYBE,                     0},
>   	{"message",                     tMESSAGE,                   0},
> +	{"mta" ,                        tMTA,                       1},
>   	{"neutral",                     tNEUTRAL,                   0},
>   	{"nocode",                      tNOCODE,                    0},
>   	{"nonbrowsable",                tNONBROWSABLE,              0},


I think that currently threading attribute is used only as widl 
extension for registration code. It probably predates midl winrt, but it 
looks like it's mostly compatible. Maybe we should make the extension 
more compatible with winrt, eg. migrate our code to use 'mta' instead or 
'free' (instead of making mta winrt-only)?


Also, as Zebediah pointed out, generated header comments are not 
necessarily something we want. At very least, you could extract those 
parts of the series into a separated patch so we can discus it from 
there. They don't really belong to parsing part of their support anyway. 
FWIW, as header/IDL user, I think that the right place to look for those 
things are IDL files, not generated headers, so comments there are not 
very useful anyway. If we want to provide more informational comments in 
headers, I would suggest to print IDL attributes in IDL syntax in 
comments instead.


Thanks,

Jacek




More information about the wine-devel mailing list