On 1/25/21 12:17 PM, Jacek Caban wrote:
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)?
Ah sorry, I missed your message and resent the series with just the comments removed. I guess if there's some refactoring to be done it can still be done later and remove the WinRT-only flag?
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.
Yes, I removed them. I don't think they are very useful anyway, they are simply used to translate the IDL attributes into something readable in the generated header.