On 11/10/2012 22:48, m...@mtew.isa-geek.net wrote:
From: Max TenEyck Woodbury <max+...@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?