Added writing forward declaration of dispinterface.
This commit is contained in:
parent
0fb8f4a15e
commit
5c98265050
|
@ -682,7 +682,8 @@ void write_forward(type_t *iface)
|
||||||
* attributes - however, if we don't have a full definition at this point
|
* 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
|
* (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 */
|
* 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,"#ifndef __%s_FWD_DEFINED__\n", iface->name);
|
||||||
fprintf(header,"#define __%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);
|
fprintf(header, "typedef struct %s %s;\n", iface->name, iface->name);
|
||||||
|
|
|
@ -595,7 +595,7 @@ dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(0, $2, 0); }
|
||||||
dispinterfacehdr: attributes dispinterface { $$ = $2;
|
dispinterfacehdr: attributes dispinterface { $$ = $2;
|
||||||
if ($$->defined) yyerror("multiple definition error\n");
|
if ($$->defined) yyerror("multiple definition error\n");
|
||||||
$$->attrs = $1;
|
$$->attrs = $1;
|
||||||
/* $$->attrs = make_attr(ATTR_DISPINTERFACE); */
|
$$->attrs = make_attr(ATTR_DISPINTERFACE);
|
||||||
/* LINK($$->attrs, $1); */
|
/* LINK($$->attrs, $1); */
|
||||||
$$->ref = find_type("IDispatch", 0);
|
$$->ref = find_type("IDispatch", 0);
|
||||||
if (!$$->ref) yyerror("IDispatch is undefined\n");
|
if (!$$->ref) yyerror("IDispatch is undefined\n");
|
||||||
|
|
|
@ -98,6 +98,7 @@ enum attr_type
|
||||||
ATTR_V1ENUM,
|
ATTR_V1ENUM,
|
||||||
ATTR_VERSION,
|
ATTR_VERSION,
|
||||||
ATTR_WIREMARSHAL,
|
ATTR_WIREMARSHAL,
|
||||||
|
ATTR_DISPINTERFACE
|
||||||
};
|
};
|
||||||
|
|
||||||
enum expr_type
|
enum expr_type
|
||||||
|
|
Loading…
Reference in New Issue