On 1/19/21 11:42 AM, Rémi Bernon wrote:
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@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.
MIDL does a lot of things we don't, especially where comments are concerned. I'm not aware of it being a copyright concern to avoid matching MIDL exactly (though I'm also not aware if it not being one), but I also doubt we should write extra code to match MIDL where it doesn't impact the actual C compiler.