ANEW ANN static Vector get_types(const Env env, Type t) {
const Vector v = new_vector(env->gwion->mp);
do if(GET_FLAG(t, template))
- vector_add(v, (vtype)t->e->def->tmpl->list.list);
+ vector_add(v, (vtype)t->e->def->tmpl->list);
while((t = owner_type(env, t)));
return v;
}
ANN static ID_List get_total_type_list(const Env env, const Type t) {
const Type parent = owner_type(env, t);
if(!parent)
- return t->e->def->tmpl ? t->e->def->tmpl->list.list : NULL;
+ return t->e->def->tmpl ? t->e->def->tmpl->list : NULL;
const Vector v = get_types(env, parent);
const ID_List base = (ID_List)vector_pop(v);
if(!base) {
free_vector(env->gwion->mp, v);
- return t->e->def->tmpl ? t->e->def->tmpl->list.list : NULL;
+ return t->e->def->tmpl ? t->e->def->tmpl->list : NULL;
}
const ID_List types = id_list_copy(env->gwion->mp, base);
ID_List list, tmp = types;
list = (ID_List)vector_pop(v);
tmp = (tmp->next = id_list_copy(env->gwion->mp, list));
}
- tmp->next = t->e->def->tmpl->list.list;
+ tmp->next = t->e->def->tmpl->list;
free_vector(env->gwion->mp, v);
return types;
}
}
ANN static size_t template_size(const Env env, struct tmpl_info* info) {
- ID_List base = info->cdef->tmpl->list.list;
+ ID_List base = info->cdef->tmpl->list;
size_t size = tmpl_set(info, info->cdef->base.type);
do size += tmpl_set(info, type_decl_resolve(env, info->call->td));
while((info->call = info->call->next) && (base = base->next) && ++size);
if(!type->types)
ERR_O(t->e->def->pos,
"you must provide template types for type '%s'", t->name)
- if(template_match(t->e->def->tmpl->list.list, type->types) < 0)
+ if(template_match(t->e->def->tmpl->list, type->types) < 0)
ERR_O(type->xid->pos, "invalid template types number")
const Class_Def a = template_class(env, t->e->def, type->types);
SET_FLAG(a, ref);