Commit 069d7b02 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

widl: Support async interfaces in headers generation.

parent b467f2de
...@@ -1611,8 +1611,13 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts) ...@@ -1611,8 +1611,13 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts)
case STMT_TYPE: case STMT_TYPE:
if (type_get_type(stmt->u.type) == TYPE_INTERFACE) if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
{ {
if (is_object(stmt->u.type) || is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE)) type_t *iface = stmt->u.type;
write_forward(header, stmt->u.type); if (is_object(iface) || is_attr(iface->attrs, ATTR_DISPINTERFACE))
{
write_forward(header, iface);
if (iface->details.iface->async_iface)
write_forward(header, iface->details.iface->async_iface);
}
} }
else if (type_get_type(stmt->u.type) == TYPE_COCLASS) else if (type_get_type(stmt->u.type) == TYPE_COCLASS)
write_coclass_forward(header, stmt->u.type); write_coclass_forward(header, stmt->u.type);
...@@ -1647,12 +1652,18 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons ...@@ -1647,12 +1652,18 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
if (type_get_type(stmt->u.type) == TYPE_INTERFACE) if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
{ {
type_t *iface = stmt->u.type; type_t *iface = stmt->u.type;
type_t *async_iface = iface->details.iface->async_iface;
if (is_object(iface)) is_object_interface++; if (is_object(iface)) is_object_interface++;
if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type)) if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type))
{ {
write_com_interface_start(header, iface); write_com_interface_start(header, iface);
write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE); write_header_stmts(header, type_iface_get_stmts(iface), stmt->u.type, TRUE);
write_com_interface_end(header, iface); write_com_interface_end(header, iface);
if (async_iface)
{
write_com_interface_start(header, async_iface);
write_com_interface_end(header, async_iface);
}
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment