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

Jacek Caban jacek at codeweavers.com
Tue Jan 26 05:33:37 CST 2021


On 26.01.2021 08:56, Rémi Bernon wrote:
> On 1/25/21 12:35 PM, Rémi Bernon wrote:
>> As a WinRT specific alias to free-threaded model.
>>
>> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
>> ---
>>   tools/widl/parser.l | 1 +
>>   tools/widl/parser.y | 2 ++
>>   2 files changed, 3 insertions(+)
>>
>> 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},
>> diff --git a/tools/widl/parser.y b/tools/widl/parser.y
>> index 48f180cdb49..4ce84cc2440 100644
>> --- a/tools/widl/parser.y
>> +++ b/tools/widl/parser.y
>> @@ -222,6 +222,7 @@ static typelib_t *current_typelib;
>>   %token tMAYBE tMESSAGE
>>   %token tMETHODS
>>   %token tMODULE
>> +%token tMTA
>>   %token tNAMESPACE
>>   %token tNOCODE tNONBROWSABLE
>>   %token tNONCREATABLE
>> @@ -1154,6 +1155,7 @@ threading_type:
>>       | tSINGLE                { $$ = THREADING_SINGLE; }
>>       | tFREE                    { $$ = THREADING_FREE; }
>>       | tBOTH                    { $$ = THREADING_BOTH; }
>> +    | tMTA                    { $$ = THREADING_FREE; }
>>       ;
>>     pointer_type:
>>
>
> So, should I just remove the WinRT-specific flag here, so mta could be 
> used instead of free?


Sounds good to me.


> Does it make sense to rename the enum too to make it more consistent?


I don't see a need for that, but I'd say it's up to you.


Thanks,

Jacek




More information about the wine-devel mailing list