wine/tools/widl header.c
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Dec 2 07:15:45 CST 2005
ChangeSet ID: 21630
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/12/02 07:15:45
Modified files:
tools/widl : header.c
Log message:
Vincent Béron <vberon at mecano.gme.usherb.ca>
Reorder the virtual table definition so it's defined before it is used
in widl header output.
Patch: http://cvs.winehq.org/patch.py?id=21630
Old revision New revision Changes Path
1.39 1.40 +8 -10 wine/tools/widl/header.c
Index: wine/tools/widl/header.c
diff -u -p wine/tools/widl/header.c:1.39 wine/tools/widl/header.c:1.40
--- wine/tools/widl/header.c:1.39 2 Dec 2005 13:15:45 -0000
+++ wine/tools/widl/header.c 2 Dec 2005 13:15:45 -0000
@@ -827,17 +827,16 @@ static void write_com_interface(type_t *
}
fprintf(header, "#else\n");
/* C interface */
- fprintf(header, "typedef struct %sVtbl %sVtbl;\n", iface->name, iface->name);
- fprintf(header, "interface %s {\n", iface->name);
- fprintf(header, " const %sVtbl* lpVtbl;\n", iface->name);
- fprintf(header, "};\n");
- fprintf(header, "struct %sVtbl {\n", iface->name);
+ fprintf(header, "typedef struct %sVtbl {\n", iface->name);
indentation++;
fprintf(header, " BEGIN_INTERFACE\n");
fprintf(header, "\n");
write_c_method_def(iface);
indentation--;
fprintf(header, " END_INTERFACE\n");
+ fprintf(header, "} %sVtbl;\n", iface->name);
+ fprintf(header, "interface %s {\n", iface->name);
+ fprintf(header, " const %sVtbl* lpVtbl;\n", iface->name);
fprintf(header, "};\n");
fprintf(header, "\n");
fprintf(header, "#ifdef COBJMACROS\n");
@@ -894,17 +893,16 @@ void write_dispinterface(type_t *iface)
fprintf(header, "};\n");
fprintf(header, "#else\n");
/* C interface */
- fprintf(header, "typedef struct %sVtbl %sVtbl;\n", iface->name, iface->name);
- fprintf(header, "interface %s {\n", iface->name);
- fprintf(header, " const %sVtbl* lpVtbl;\n", iface->name);
- fprintf(header, "};\n");
- fprintf(header, "struct %sVtbl {\n", iface->name);
+ fprintf(header, "typedef struct %sVtbl {\n", iface->name);
indentation++;
fprintf(header, " BEGIN_INTERFACE\n");
fprintf(header, "\n");
write_c_disp_method_def(iface);
indentation--;
fprintf(header, " END_INTERFACE\n");
+ fprintf(header, "} %sVtbl;\n", iface->name);
+ fprintf(header, "interface %s {\n", iface->name);
+ fprintf(header, " const %sVtbl* lpVtbl;\n", iface->name);
fprintf(header, "};\n");
fprintf(header, "\n");
fprintf(header, "#ifdef COBJMACROS\n");
More information about the wine-cvs
mailing list