[PATCH 2/5] widl: Support WinRT marshaling_behavior attribute parsing.

Rémi Bernon rbernon at codeweavers.com
Tue Jan 19 11:42:00 CST 2021


On 1/19/21 6:34 PM, Zebediah Figura (she/her) wrote:
> On 1/19/21 7:04 AM, Rémi Bernon wrote:
>> Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
>> ---
>>   tools/widl/header.c    |  7 +++++++
>>   tools/widl/parser.l    |  4 ++++
>>   tools/widl/parser.y    | 18 ++++++++++++++++--
>>   tools/widl/widltypes.h |  9 +++++++++
>>   4 files changed, 36 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/widl/header.c b/tools/widl/header.c
>> index 223ab5c5ca9..21f8528c31d 100644
>> --- a/tools/widl/header.c
>> +++ b/tools/widl/header.c
>> @@ -1494,6 +1494,13 @@ static void write_winrt_type_comments(FILE *header, const type_t *type)
>>           fprintf(header, " * Introduced to %s in version %d.%d\n *\n", name, (ver >> 16) & 0xffff, ver & 0xffff);
>>           free(name);
>>       }
>> +    switch (get_attrv(type->attrs, ATTR_MARSHALING_BEHAVIOR))
>> +    {
>> +        case MARSHALING_AGILE: fprintf(header, " * Class Marshaling Behavior:  Agile - Class is agile\n *\n"); break;
>> +        case MARSHALING_STANDARD: fprintf(header, " * Class Marshaling Behavior:  Standard - Class marshals using the standard marshaler\n *\n"); break;
>> +        case MARSHALING_NONE: fprintf(header, " * Class Marshaling Behavior:  None - Class cannot be marshaled\n *\n"); break;
>> +        default: break;
>> +    }
>>   }
>>   
> 
> I guess I should have asked this earlier, but is there a point in
> writing these comments?
> 

Probably not, but MIDL does it.
-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list