widl: Use the type_type field to track whether the type is an alias.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
07c131f0f4
commit
2babcd6c1c
|
@ -59,7 +59,6 @@ type_t *make_type(enum type_type type)
|
|||
t->user_types_registered = FALSE;
|
||||
t->tfswrite = FALSE;
|
||||
t->checked = FALSE;
|
||||
t->is_alias = FALSE;
|
||||
t->typelib_idx = -1;
|
||||
init_loc_info(&t->loc_info);
|
||||
return t;
|
||||
|
@ -188,12 +187,11 @@ type_t *type_new_pointer(unsigned char pointer_default, type_t *ref, attr_list_t
|
|||
|
||||
type_t *type_new_alias(type_t *t, const char *name)
|
||||
{
|
||||
type_t *a = duptype(t, 0);
|
||||
type_t *a = make_type(TYPE_ALIAS);
|
||||
|
||||
a->name = xstrdup(name);
|
||||
a->attrs = NULL;
|
||||
a->orig = t;
|
||||
a->is_alias = TRUE;
|
||||
/* for pointer types */
|
||||
a->details = t->details;
|
||||
init_loc_info(&a->loc_info);
|
||||
|
|
|
@ -59,7 +59,7 @@ type_t *duptype(type_t *t, int dupname);
|
|||
/* un-alias the type until finding the non-alias type */
|
||||
static inline type_t *type_get_real_type(const type_t *type)
|
||||
{
|
||||
if (type->is_alias)
|
||||
if (type->type_type == TYPE_ALIAS)
|
||||
return type_get_real_type(type->orig);
|
||||
else
|
||||
return (type_t *)type;
|
||||
|
@ -299,7 +299,7 @@ static inline unsigned char type_array_get_ptr_default_fc(const type_t *type)
|
|||
|
||||
static inline int type_is_alias(const type_t *type)
|
||||
{
|
||||
return type->is_alias;
|
||||
return type->type_type == TYPE_ALIAS;
|
||||
}
|
||||
|
||||
static inline type_t *type_alias_get_aliasee(const type_t *type)
|
||||
|
|
|
@ -451,7 +451,6 @@ struct _type_t {
|
|||
unsigned int user_types_registered : 1;
|
||||
unsigned int tfswrite : 1; /* if the type needs to be written to the TFS */
|
||||
unsigned int checked : 1;
|
||||
unsigned int is_alias : 1; /* is the type an alias? */
|
||||
};
|
||||
|
||||
struct _var_t {
|
||||
|
@ -593,8 +592,6 @@ char *format_namespace(struct namespace *namespace, const char *prefix, const ch
|
|||
|
||||
static inline enum type_type type_get_type_detect_alias(const type_t *type)
|
||||
{
|
||||
if (type->is_alias)
|
||||
return TYPE_ALIAS;
|
||||
return type->type_type;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue