Commit 2babcd6c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

widl: Use the type_type field to track whether the type is an alias.

parent 07c131f0
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment