WIDL: generate BEGIN_INTERFACE,END_INTERFACE macros instead of ICOM_MSVTABLE_COMPAT_FIELDS
Mike McCormack
mike at codeweavers.com
Sat Aug 21 08:21:12 CDT 2004
This allows our widl generated headers to be compiled by MSVC.
Mike
ChangeLog:
* generate BEGIN_INTERFACE,END_INTERFACE macros instead of
ICOM_MSVTABLE_COMPAT_FIELDS
-------------- next part --------------
Index: include/unknwn.idl
===================================================================
RCS file: /home/wine/wine/include/unknwn.idl,v
retrieving revision 1.4
diff -u -r1.4 unknwn.idl
--- include/unknwn.idl 12 Apr 2003 00:09:14 -0000 1.4
+++ include/unknwn.idl 21 Aug 2004 11:52:41 -0000
@@ -24,9 +24,13 @@
cpp_quote("#if defined(ICOM_MSVTABLE_COMPAT) && (!defined(__cplusplus) || defined(CINTERFACE))")
cpp_quote("# define ICOM_MSVTABLE_COMPAT_FIELDS long dummyRTTI1,dummyRTTI2;")
cpp_quote("# define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE 0,0,")
+cpp_quote("# define BEGIN_INTERFACE ICOM_MSVTABLE_COMPAT_FIELDS")
+cpp_quote("# define END_INTERFACE")
cpp_quote("#else")
cpp_quote("# define ICOM_MSVTABLE_COMPAT_FIELDS")
cpp_quote("# define ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE")
+cpp_quote("# define BEGIN_INTERFACE")
+cpp_quote("# define END_INTERFACE")
cpp_quote("#endif")
/* Interfaces */
Index: tools/widl/header.c
===================================================================
RCS file: /home/wine/wine/tools/widl/header.c,v
retrieving revision 1.23
diff -u -r1.23 header.c
--- tools/widl/header.c 11 Aug 2004 19:43:45 -0000 1.23
+++ tools/widl/header.c 21 Aug 2004 11:52:42 -0000
@@ -767,10 +767,11 @@
fprintf(header, "};\n");
fprintf(header, "struct %sVtbl {\n", iface->name);
indentation++;
- fprintf(header, " ICOM_MSVTABLE_COMPAT_FIELDS\n");
+ fprintf(header, " BEGIN_INTERFACE\n");
fprintf(header, "\n");
write_c_method_def(iface);
indentation--;
+ fprintf(header, " END_INTERFACE\n");
fprintf(header, "};\n");
fprintf(header, "\n");
fprintf(header, "#ifdef COBJMACROS\n");
More information about the wine-patches
mailing list