ANN Nspc env_nspc(const Env);
ANN Type scan_type(const Env, const Type, const Type_Decl*);
ANN Type type_decl_resolve(const Env, const Type_Decl*);
+// tl2str returns a mp_alloced string
ANEW ANN m_str tl2str(const Env, const Type_List); // in type_decl.c
ANN m_bool compat_func(const __restrict__ Func_Def, const __restrict__ Func_Def);
ANN Type known_type(const Env env, const Type_Decl*);
return;
}
}
- xfree(tmpl_name);
+ free_mstr(emit->gwion->mp, tmpl_name);
dt->def = f->def;
const Func_Def def = from_base(emit->env, dt, f->value_ref->owner);
if(!def)
do {
m_str name = td2str(env, tl->td);
text_add(&info->text, name);
- xfree(name);// we can delete that after PoolizeStrings
+ free_mstr(env->gwion->mp, name);
if(tl->next)
text_add(&info->text, ",");
} while((tl = tl->next));
td_info_run(env, &info);
text_add(&info.text, ">");
}
- const m_str str = strdup(info.text.str);
- text_release(&info.text);
- return str;
+ return info.text.str;
}
ANEW ANN m_str tl2str(const Env env, Type_List tl) {
struct td_info info = { .tl=tl, { .mp=env->gwion->mp} };
td_info_run(env, &info);
- return strdup(info.text.str);
+ return info.text.str;
}
ANN static inline void* type_unknown(const Env env, const ID_List id) {