widl: Avoid generating duplicate typelib entries for structure tag names.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Dmitry Timoshkov 2015-11-03 13:32:01 +08:00 committed by Alexandre Julliard
parent 3cd67463bf
commit ded915aa7c
1 changed files with 6 additions and 1 deletions

View File

@ -300,7 +300,12 @@ type_t *type_new_enum(const char *name, struct namespace *namespace, int defined
type_t *type_new_struct(char *name, struct namespace *namespace, int defined, var_list_t *fields)
{
type_t *tag_type = name ? find_type(name, namespace, tsSTRUCT) : NULL;
type_t *t = make_type(TYPE_STRUCT);
type_t *t;
/* avoid creating duplicate typelib type entries */
if (tag_type && do_typelib) return tag_type;
t = make_type(TYPE_STRUCT);
t->name = name;
t->namespace = namespace;