Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/typetree.c | 4 +--- tools/widl/typetree.h | 4 ++-- tools/widl/widltypes.h | 3 --- 3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index e727d8c697..d823a46edc 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -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); diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h index 07179a06b4..db8c1fcade 100644 --- a/tools/widl/typetree.h +++ b/tools/widl/typetree.h @@ -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) diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 5e0f34db8d..29ff266388 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -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; }