widl: Move the "idx" parameter from struct func_details to var_t.
It's not a part of the type; e.g. it doesn't make sense on a function pointer. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a55aa54c42
commit
8b2a065892
|
@ -614,14 +614,14 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset)
|
|||
if (!is_local(func->attrs)) {
|
||||
const var_t *cas = is_callas(func->attrs);
|
||||
const char *cname = cas ? cas->name : NULL;
|
||||
int idx = func->declspec.type->details.function->idx;
|
||||
int idx = func->func_idx;
|
||||
if (cname) {
|
||||
const statement_t *stmt2;
|
||||
STATEMENTS_FOR_EACH_FUNC(stmt2, type_iface_get_stmts(iface)) {
|
||||
const var_t *m = stmt2->u.var;
|
||||
if (!strcmp(m->name, cname))
|
||||
{
|
||||
idx = m->declspec.type->details.function->idx;
|
||||
idx = m->func_idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,6 @@ type_t *type_new_function(var_list_t *args)
|
|||
t = make_type(TYPE_FUNCTION);
|
||||
t->details.function = xmalloc(sizeof(*t->details.function));
|
||||
t->details.function->args = args;
|
||||
t->details.function->idx = -1;
|
||||
return t;
|
||||
}
|
||||
|
||||
|
@ -413,9 +412,9 @@ type_t *type_new_bitfield(type_t *field, const expr_t *bits)
|
|||
return t;
|
||||
}
|
||||
|
||||
static int compute_method_indexes(type_t *iface)
|
||||
static unsigned int compute_method_indexes(type_t *iface)
|
||||
{
|
||||
int idx;
|
||||
unsigned int idx;
|
||||
statement_t *stmt;
|
||||
|
||||
if (!iface->details.iface)
|
||||
|
@ -430,7 +429,7 @@ static int compute_method_indexes(type_t *iface)
|
|||
{
|
||||
var_t *func = stmt->u.var;
|
||||
if (!is_callas(func->attrs))
|
||||
func->declspec.type->details.function->idx = idx++;
|
||||
func->func_idx = idx++;
|
||||
}
|
||||
|
||||
return idx;
|
||||
|
|
|
@ -342,7 +342,6 @@ struct func_details
|
|||
{
|
||||
var_list_t *args;
|
||||
struct _var_t *retval;
|
||||
int idx;
|
||||
};
|
||||
|
||||
struct iface_details
|
||||
|
@ -460,9 +459,12 @@ struct _var_t {
|
|||
decl_spec_t declspec;
|
||||
attr_list_t *attrs;
|
||||
expr_t *eval;
|
||||
unsigned int procstring_offset;
|
||||
|
||||
unsigned int typestring_offset;
|
||||
|
||||
/* fields specific to functions */
|
||||
unsigned int procstring_offset, func_idx;
|
||||
|
||||
struct _loc_info_t loc_info;
|
||||
|
||||
/* parser-internal */
|
||||
|
|
Loading…
Reference in New Issue