Commit 033cade6 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Consolidate writing of COM and dispatch interfaces into one function to…

widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does.
parent 550aaade
......@@ -52,7 +52,6 @@ extern void write_array(FILE *h, array_dims_t *v, int field);
extern void write_import(const char *fname);
extern void write_forward(type_t *iface);
extern void write_interface(type_t *iface);
extern void write_dispinterface(type_t *iface);
extern void write_locals(FILE *fp, const type_t *iface, int body);
extern void write_coclass(type_t *cocl);
extern void write_coclass_forward(type_t *cocl);
......
......@@ -904,7 +904,7 @@ dispinterfacedef: dispinterfacehdr '{'
'}' { $$ = $1;
$$->fields_or_args = $3;
$$->funcs = $4;
if (!parse_only && do_header) write_dispinterface($$);
if (!parse_only && do_header) write_interface($$);
if (!parse_only && do_idfile) write_diid($$);
is_in_interface = FALSE;
}
......@@ -912,7 +912,7 @@ dispinterfacedef: dispinterfacehdr '{'
'{' interface ';' '}' { $$ = $1;
$$->fields_or_args = $3->fields_or_args;
$$->funcs = $3->funcs;
if (!parse_only && do_header) write_dispinterface($$);
if (!parse_only && do_header) write_interface($$);
if (!parse_only && do_idfile) write_diid($$);
is_in_interface = FALSE;
}
......
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