Added writing forward declaration of dispinterface.

This commit is contained in:
Jacek Caban 2004-10-18 19:35:08 +00:00 committed by Alexandre Julliard
parent 0fb8f4a15e
commit 5c98265050
3 changed files with 4 additions and 2 deletions

View File

@ -682,7 +682,8 @@ void write_forward(type_t *iface)
* attributes - however, if we don't have a full definition at this point
* (i.e. this is an IDL forward), then we also assume that it is an object
* interface, since non-object interfaces shouldn't need forwards */
if ((!iface->defined || is_object(iface->attrs)) && !iface->written) {
if ((!iface->defined || is_object(iface->attrs) || is_attr(iface->attrs, ATTR_DISPINTERFACE))
&& !iface->written) {
fprintf(header,"#ifndef __%s_FWD_DEFINED__\n", iface->name);
fprintf(header,"#define __%s_FWD_DEFINED__\n", iface->name);
fprintf(header, "typedef struct %s %s;\n", iface->name, iface->name);

View File

@ -595,7 +595,7 @@ dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(0, $2, 0); }
dispinterfacehdr: attributes dispinterface { $$ = $2;
if ($$->defined) yyerror("multiple definition error\n");
$$->attrs = $1;
/* $$->attrs = make_attr(ATTR_DISPINTERFACE); */
$$->attrs = make_attr(ATTR_DISPINTERFACE);
/* LINK($$->attrs, $1); */
$$->ref = find_type("IDispatch", 0);
if (!$$->ref) yyerror("IDispatch is undefined\n");

View File

@ -98,6 +98,7 @@ enum attr_type
ATTR_V1ENUM,
ATTR_VERSION,
ATTR_WIREMARSHAL,
ATTR_DISPINTERFACE
};
enum expr_type