Rémi Bernon : widl: Remove useless find_type_or_error2 helper.
Alexandre Julliard
julliard at winehq.org
Thu Feb 4 16:15:20 CST 2021
Module: wine
Branch: master
Commit: b3f807a14253d9464f5cc3ce6ec9aabf10166073
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b3f807a14253d9464f5cc3ce6ec9aabf10166073
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Thu Feb 4 17:43:39 2021 +0100
widl: Remove useless find_type_or_error2 helper.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tools/widl/parser.y | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 480552e3723..328829cc0da 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -76,7 +76,6 @@ static warning_list_t *append_warning(warning_list_t *, int);
static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs);
static type_t *find_type_or_error(const char *name, int t);
-static type_t *find_type_or_error2(char *name, int t);
static var_t *reg_const(var_t *var);
@@ -1015,7 +1014,7 @@ interfacedef: interfacehdr inherit
| interfacehdr ':' aIDENTIFIER
'{' import int_statements '}'
semicolon_opt { $$ = $1;
- type_interface_define($$, find_type_or_error2($3, 0), $6);
+ type_interface_define($$, find_type_or_error($3, 0), $6);
}
| dispinterfacedef semicolon_opt { $$ = $1; }
;
@@ -1255,7 +1254,7 @@ acf_int_statement
acf_interface
: acf_attributes tINTERFACE aKNOWNTYPE '{' acf_int_statements '}'
- { type_t *iface = find_type_or_error2($3, 0);
+ { type_t *iface = find_type_or_error($3, 0);
if (type_get_type(iface) != TYPE_INTERFACE)
error_loc("%s is not an interface\n", iface->name);
iface->attrs = append_attr_list(iface->attrs, $1);
@@ -2105,13 +2104,6 @@ static type_t *find_type_or_error(const char *name, int t)
return type;
}
-static type_t *find_type_or_error2(char *name, int t)
-{
- type_t *tp = find_type_or_error(name, t);
- free(name);
- return tp;
-}
-
int is_type(const char *name)
{
return find_type(name, current_namespace, 0) != NULL ||
More information about the wine-cvs
mailing list