From d7afbd596848ca78bd094e0ce20691981820b550 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 5 Nov 2019 21:49:26 +0100 Subject: [PATCH] :shirt: new_tmpl_base --- ast | 2 +- include/gwi.h | 2 +- src/import/cdef.c | 2 +- src/parse/scan0.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ast b/ast index f8d01d6c..af63abc5 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit f8d01d6c09933881a456182c57a384c826105b2e +Subproject commit af63abc5d9f76ffcf128ee7784068a3a8283f5a8 diff --git a/include/gwi.h b/include/gwi.h index a24e0f1a..07ac3f2c 100644 --- a/include/gwi.h +++ b/include/gwi.h @@ -13,6 +13,6 @@ struct Gwi_ { #include "import/internals.h" static inline Tmpl* gwi_tmpl(const Gwi gwi) { - return new_tmpl(gwi->gwion->mp, gwi->ck->tmpl, -1); + return new_tmpl_base(gwi->gwion->mp, gwi->ck->tmpl); } #endif diff --git a/src/import/cdef.c b/src/import/cdef.c index c45eb331..d277d095 100644 --- a/src/import/cdef.c +++ b/src/import/cdef.c @@ -63,7 +63,7 @@ ANN2(1,2) Type gwi_class_ini(const Gwi gwi, const m_str name, const m_str parent struct ImportCK ck = { .name=name }; CHECK_BO(check_typename_def(gwi, &ck)) Type_Decl *td = str2decl(gwi, parent ?: "Object"); // check - Tmpl* tmpl = ck.tmpl ? new_tmpl(gwi->gwion->mp, ck.tmpl, -1) : NULL; + Tmpl* tmpl = ck.tmpl ? new_tmpl_base(gwi->gwion->mp, ck.tmpl) : NULL; if(tmpl) template_push_types(gwi->gwion->env, tmpl); const Type p = known_type(gwi->gwion->env, td); // check diff --git a/src/parse/scan0.c b/src/parse/scan0.c index 7721b8de..53a02301 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -330,7 +330,7 @@ ANN static Type scan0_class_def_init(const Env env, const Class_Def cdef) { inherit_tmpl(env, cdef); set_template(t, cdef); } else if(SAFE_FLAG(env->class_def, template)) { - cdef->base.tmpl = new_tmpl(env->gwion->mp, env->class_def->e->def->base.tmpl->list, -1); + cdef->base.tmpl = new_tmpl_base(env->gwion->mp, env->class_def->e->def->base.tmpl->list); set_template(t, cdef); } if(cdef->base.ext && cdef->base.ext->array) -- 2.43.0