[1/7] widl: When adding an interface typedef do check whether it has been already added while resolving the parent interface.
Dmitry Timoshkov
dmitry at baikal.ru
Sat Oct 31 01:35:24 CDT 2015
From: Sebastian Lackner <sebastian at fds-team.de>
Adding proper attribution to Sebastian Lackner as the author of this patch,
for some reason e-mail client dropped it from the original message.
Dmitry Timoshkov <dmitry at baikal.ru> wrote:
> This patch fixes a long standing bug that when an inherited interface gets
> referenced by a parent interface definition then multiple definitions of an
> inherited interface get added to a typelib.
>
> This bug has been discovered by the patch that emits a warning for a duplicate
> uuid. A test case for this problem is added in the last patch of the series.
>
> Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
> Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
> ---
> tools/widl/write_msft.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
> index fc0eae7..98081f2 100644
> --- a/tools/widl/write_msft.c
> +++ b/tools/widl/write_msft.c
> @@ -2078,6 +2078,10 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface)
> add_interface_typeinfo(typelib, inherit);
> }
>
> + /* check typelib_idx again, it could have been added while resolving the parent interface */
> + if (-1 < interface->typelib_idx)
> + return;
> +
> interface->typelib_idx = typelib->typelib_header.nrtypeinfos;
> msft_typeinfo = create_msft_typeinfo(typelib, TKIND_INTERFACE, interface->name, interface->attrs);
> msft_typeinfo->typeinfo->size = pointer_size;
> --
> 2.6.2
>
>
>
--
Dmitry.
More information about the wine-patches
mailing list