};
#include "import/internals.h"
-
+static inline Tmpl* gwi_tmpl(const Gwi gwi) {
+ return new_tmpl(gwi->gwion->mp, gwi->ck->tmpl, -1);
+}
#endif
ANN Type_Decl* str2decl(const Gwi, const m_str);
ANN Var_Decl str2var(const Gwi, const m_str);
ANN Var_Decl_List str2varlist(const Gwi, const m_str);
-
#endif
Func_Base *base = new_func_base(gwi->gwion->mp, ck->td, ck->sym, arg_list);
ck->td = NULL;
if(ck->tmpl) {
- base->tmpl = new_tmpl(gwi->gwion->mp, ck->tmpl, -1);
+ base->tmpl = gwi_tmpl(gwi);
ck->tmpl = NULL;
}
return base;
td->flag |= flag;
const Type_Def tdef = new_type_def(gwi->gwion->mp, td, gwi->ck->sym);
if(gwi->ck->tmpl)
- tdef->tmpl = new_tmpl(gwi->gwion->mp, gwi->ck->tmpl, -1);
+ tdef->tmpl = gwi_tmpl(gwi);
gwi->ck->td = NULL;
gwi->ck->tmpl = NULL;
const m_bool ret = traverse_type_def(gwi->gwion->env, tdef);
if(gwi->ck->tmpl) {
if(udef->xid)
GWI_ERR_O(_("Template union type can't declare instance at declaration"));
- udef->tmpl = new_tmpl(gwi->gwion->mp, gwi->ck->tmpl, -1);
+ udef->tmpl = gwi_tmpl(gwi);
gwi->ck->tmpl = NULL;
}
const Type t = union_type(gwi, udef);