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

Jacek Caban jacek at codeweavers.com
Mon Jan 25 07:46:36 CST 2021


On 25.01.2021 14:12, Alexandre Julliard wrote:
>> 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)?
> The current support was modeled after the C++ attributes:
>
>    https://docs.microsoft.com/en-us/cpp/windows/attributes/threading-cpp?view=msvc-160
>
> so it may make sense to keep 'free' as an alias. OTOH we don't seem to
> be using it in the existing code anyway.


Sure, but even if we keep the alias, it seems right to always expose 
'mta' together with threading attribute rather than having it winrt-only.


Jacek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210125/69289488/attachment.htm>


More information about the wine-devel mailing list