From 97d9a60ab2cb123f7aa814cc08982b2775b20bdd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 5 May 2020 14:46:00 +0200 Subject: [PATCH] :art: Improve gwi_struct_ini --- include/import/cdef.h | 2 +- src/import/cdef.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/import/cdef.h b/include/import/cdef.h index d4bdd968..25722edc 100644 --- a/include/import/cdef.h +++ b/include/import/cdef.h @@ -1,7 +1,7 @@ #ifndef __IMPORT_CLASS #define __IMPORT_CLASS ANN2(1,2) Type gwi_class_ini(const Gwi gwi, const m_str, const m_str parent); -ANN2(1,2) Type gwi_struct_ini(const Gwi gwi, const m_str, const m_uint size); +ANN2(1,2) Type gwi_struct_ini(const Gwi gwi, const m_str); ANN2(1) void gwi_class_xtor(const Gwi gwi, const f_xtor ctor, const f_xtor dtor); ANN m_int gwi_class_end(const Gwi gwi); ANN void inherit(const Type); diff --git a/src/import/cdef.c b/src/import/cdef.c index 60a3e5bc..8ba8d81b 100644 --- a/src/import/cdef.c +++ b/src/import/cdef.c @@ -104,10 +104,10 @@ ANN2(1,2) Type gwi_class_ini(const Gwi gwi, const m_str name, const m_str parent return type_finish(gwi, t); } -ANN Type gwi_struct_ini(const Gwi gwi, const m_str name, const m_uint size) { +ANN Type gwi_struct_ini(const Gwi gwi, const m_str name) { CHECK_OO(str2sym(gwi, name)) const Type t = new_type(gwi->gwion->mp, ++gwi->gwion->env->scope->type_xid, name, NULL); - t->size = size; + t->e->tuple = new_tupleform(gwi->gwion->mp, NULL); gwi_type_flag(t); SET_FLAG(t, struct); return type_finish(gwi, t); -- 2.43.0