Thomas Faber : widl: Use 'class' for coclass typedefs in C++.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 14:29:05 CDT 2012


Module: wine
Branch: master
Commit: 52607ba66bad5f477209362f03ea2ddf8ca524de
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=52607ba66bad5f477209362f03ea2ddf8ca524de

Author: Thomas Faber <thfabba at gmx.de>
Date:   Sun Oct 14 18:35:14 2012 +0200

widl: Use 'class' for coclass typedefs in C++.

---

 tools/widl/header.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/widl/header.c b/tools/widl/header.c
index 02e3b60..2f275c7 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -1301,7 +1301,11 @@ static void write_coclass_forward(FILE *header, type_t *cocl)
 {
   fprintf(header, "#ifndef __%s_FWD_DEFINED__\n", cocl->name);
   fprintf(header, "#define __%s_FWD_DEFINED__\n", cocl->name);
+  fprintf(header, "#ifdef __cplusplus\n");
+  fprintf(header, "typedef class %s %s;\n", cocl->name, cocl->name);
+  fprintf(header, "#else\n");
   fprintf(header, "typedef struct %s %s;\n", cocl->name, cocl->name);
+  fprintf(header, "#endif /* defined __cplusplus */\n");
   fprintf(header, "#endif /* defined __%s_FWD_DEFINED__ */\n\n", cocl->name );
 }
 




More information about the wine-cvs mailing list