Zebediah Figura : widl: Check for redefinition of named user types.
Alexandre Julliard
julliard at winehq.org
Wed Aug 21 14:39:32 CDT 2019
Module: wine
Branch: master
Commit: a58e4cc07cfa3c521f1cb6708f48d2755f369938
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a58e4cc07cfa3c521f1cb6708f48d2755f369938
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Aug 20 22:28:24 2019 -0500
widl: Check for redefinition of named user types.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/widl/typetree.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index faa5820..524d005 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -285,6 +285,8 @@ type_t *type_new_enum(const char *name, struct namespace *namespace, int defined
t->details.enumeration->enums = enums;
t->defined = TRUE;
}
+ else if (defined)
+ error_loc("redefinition of enum %s\n", name);
return t;
}
@@ -311,6 +313,8 @@ type_t *type_new_struct(char *name, struct namespace *namespace, int defined, va
t->details.structure->fields = fields;
t->defined = TRUE;
}
+ else if (defined)
+ error_loc("redefinition of struct %s\n", name);
return t;
}
@@ -336,6 +340,8 @@ type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t
t->details.structure->fields = fields;
t->defined = TRUE;
}
+ else if (defined)
+ error_loc("redefinition of union %s\n", name);
return t;
}
@@ -367,6 +373,8 @@ type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *unio
t->details.structure->fields = append_var(t->details.structure->fields, union_field);
t->defined = TRUE;
}
+ else
+ error_loc("redefinition of union %s\n", name);
return t;
}
More information about the wine-cvs
mailing list