[PATCH] tools/widl/header.c: Add a way to declare interface data members.
Nikolay Sivov
bunglehead at gmail.com
Sat Nov 10 15:10:37 CST 2012
On 11/10/2012 22:48, max at mtew.isa-geek.net wrote:
> From: Max TenEyck Woodbury <max+git at mtew.isa-geek.net>
>
> ---
> tools/widl/header.c | 14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/tools/widl/header.c b/tools/widl/header.c
> index 2f275c7..965dcbc 100644
> --- a/tools/widl/header.c
> +++ b/tools/widl/header.c
> @@ -1159,6 +1159,17 @@ static void write_com_interface_start(FILE *header, const type_t *iface)
> fprintf(header,"#define __%s_%sINTERFACE_DEFINED__\n\n", iface->name, dispinterface ? "DISP" : "");
> }
>
> +static void write_interface_data_macro(FILE *header, const type_t *iface)
> +{
> +
> + if (type_iface_get_inherit(iface))
> + write_interface_data_macro(header, type_iface_get_inherit(iface));
> +
> + fprintf(header, "#ifdef %s_IFACE_DATA\n", iface->name);
> + fprintf(header, " %s_IFACE_DATA\n", iface->name);
> + fprintf(header, "#endif /* defined %s */\n", iface->name);
> +}
> +
> static void write_com_interface_end(FILE *header, type_t *iface)
> {
> int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
> @@ -1214,6 +1225,9 @@ static void write_com_interface_end(FILE *header, type_t *iface)
> fprintf(header, "} %sVtbl;\n", iface->name);
> fprintf(header, "interface %s {\n", iface->name);
> fprintf(header, " CONST_VTBL %sVtbl* lpVtbl;\n", iface->name);
> +
> + write_interface_data_macro(header, iface);
> +
> fprintf(header, "};\n");
> fprintf(header, "\n");
> fprintf(header, "#ifdef COBJMACROS\n");
What is this?
More information about the wine-devel
mailing list