widl: Check function return values for additional prototype types.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c68b5eb850
commit
759a3bf34d
|
@ -637,15 +637,9 @@ unsigned int get_generic_handle_offset( const type_t *type )
|
|||
|
||||
/* check for types which require additional prototypes to be generated in the
|
||||
* header */
|
||||
void check_for_additional_prototype_types(const var_list_t *list)
|
||||
void check_for_additional_prototype_types(type_t *type)
|
||||
{
|
||||
const var_t *v;
|
||||
|
||||
if (!list) return;
|
||||
LIST_FOR_EACH_ENTRY( v, list, const var_t, entry )
|
||||
{
|
||||
type_t *type = v->type;
|
||||
if (!type) continue;
|
||||
if (!type) return;
|
||||
for (;;) {
|
||||
const char *name = type->name;
|
||||
if (type->user_types_registered) break;
|
||||
|
@ -686,6 +680,7 @@ void check_for_additional_prototype_types(const var_list_t *list)
|
|||
else if (type_is_complete(type))
|
||||
{
|
||||
var_list_t *vars;
|
||||
const var_t *v;
|
||||
switch (type_get_type_detect_alias(type))
|
||||
{
|
||||
case TYPE_ENUM:
|
||||
|
@ -701,7 +696,8 @@ void check_for_additional_prototype_types(const var_list_t *list)
|
|||
vars = NULL;
|
||||
break;
|
||||
}
|
||||
check_for_additional_prototype_types(vars);
|
||||
if (vars) LIST_FOR_EACH_ENTRY( v, vars, const var_t, entry )
|
||||
check_for_additional_prototype_types(v->type);
|
||||
}
|
||||
|
||||
if (type_is_alias(type))
|
||||
|
@ -714,7 +710,6 @@ void check_for_additional_prototype_types(const var_list_t *list)
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int write_serialize_function_decl(FILE *header, const type_t *type)
|
||||
{
|
||||
|
|
|
@ -2911,6 +2911,7 @@ static void check_statements(const statement_list_t *stmts, int is_inside_librar
|
|||
static void check_all_user_types(const statement_list_t *stmts)
|
||||
{
|
||||
const statement_t *stmt;
|
||||
const var_t *v;
|
||||
|
||||
if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
|
||||
{
|
||||
|
@ -2922,7 +2923,10 @@ static void check_all_user_types(const statement_list_t *stmts)
|
|||
const statement_t *stmt_func;
|
||||
STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(stmt->u.type)) {
|
||||
const var_t *func = stmt_func->u.var;
|
||||
check_for_additional_prototype_types(func->type->details.function->args);
|
||||
if (func->type->details.function->args)
|
||||
LIST_FOR_EACH_ENTRY( v, func->type->details.function->args, const var_t, entry )
|
||||
check_for_additional_prototype_types(v->type);
|
||||
check_for_additional_prototype_types(type_function_get_rettype(func->type));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -556,7 +556,7 @@ typedef enum {
|
|||
extern user_type_list_t user_type_list;
|
||||
extern context_handle_list_t context_handle_list;
|
||||
extern generic_handle_list_t generic_handle_list;
|
||||
void check_for_additional_prototype_types(const var_list_t *list);
|
||||
void check_for_additional_prototype_types(type_t *type);
|
||||
|
||||
void init_types(void);
|
||||
type_t *alloc_type(void);
|
||||
|
|
Loading…
Reference in New Issue