[PATCH 1/2] widl: don't use local methods when writing async interfaces

Jacek Caban jacek at codeweavers.com
Wed Dec 16 08:13:27 CST 2020


Hi Steve,

On 16.12.2020 10:14, Steve Lhomme wrote:
> -static void write_com_interface_end(FILE *header, type_t *iface)
> +static void write_com_interface_end(FILE *header, type_t *iface, int as_async)
>   {
>     int dispinterface = is_attr(iface->attrs, ATTR_DISPINTERFACE);
>     const UUID *uuid = get_attrp(iface->attrs, ATTR_UUID);
> @@ -1614,7 +1614,8 @@ static void write_com_interface_end(FILE *header, type_t *iface)
>     if (!dispinterface && !winrt_mode)
>     {
>       write_method_proto(header, iface);
> -    write_locals(header, iface, FALSE);
> +    if (!as_async)
> +      write_locals(header, iface, FALSE);


You could use something like

if (type_iface_get_async_iface(iface) == iface)

to avoid extra as_async argument.


Thanks,

Jacek




More information about the wine-devel mailing list