Support Coclass Forward Declarations in WIDL

Dan Hipschman dsh at linux.ucla.edu
Thu Jul 13 20:16:29 CDT 2006


Hi,

Currently, forward declarations aren't registered as types and don't cause
any code to be generated.  This patch fixes both these problems.  It doesn't
cause any change in the code generated from IDL files in the Wine source tree.
I.e., they must not depend on that feature.  MIDL supports it, though.

ChangeLog:
* Allow coclass forward declarations
---
 tools/widl/parser.y |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 284f0fd..7257bd8 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -251,7 +251,7 @@ gbl_statements:					{ $$ = NULL; }
 imp_statements:					{}
 	| imp_statements interfacedec		{ if (!parse_only) add_interface($2); }
 	| imp_statements interfacedef		{ if (!parse_only) add_interface($2); }
-	| imp_statements coclass ';'	{}
+	| imp_statements coclass ';'	{ reg_type(NULL, $2->name, 0); if (!parse_only && do_header) write_coclass_forward($2); }
 	| imp_statements coclassdef		{ if (!parse_only) add_coclass($2); }
 	| imp_statements moduledef		{ if (!parse_only) add_module($2); }
 	| imp_statements statement		{}



More information about the wine-patches mailing list