From: fennecdjay Date: Mon, 19 Sep 2022 08:39:23 +0000 (+0200) Subject: :art: Low Level plugs X-Git-Tag: nightly~249 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=e417996910c73dbc8972ab84c19b3268d279270d;p=gwion.git :art: Low Level plugs --- diff --git a/include/env/type.h b/include/env/type.h index f101936e..fbe56d9e 100644 --- a/include/env/type.h +++ b/include/env/type.h @@ -47,9 +47,10 @@ struct Type_ { m_str name; Nspc nspc; struct TypeInfo_ *info; - uint64_t size; - uint32_t array_depth; + uint64_t size; + uint64_t actual_size; struct Vector_ effects; // pre-ctor effects + uint32_t array_depth; uint16_t ref; uint16_t weight; ae_flag flag; diff --git a/src/lib/array.c b/src/lib/array.c index 9a535caf..419f3be7 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -38,7 +38,8 @@ ANN M_Object new_array(MemPool p, const Type t, const m_uint length) { const M_Object a = new_object(p, t); const m_uint depth = !tflag(t, tflag_typedef) ? t->array_depth : t->info->parent->array_depth; - const m_uint size = depth > 1 ? SZ_INT : array_base(t)->size; +// const m_uint size = depth > 1 ? SZ_INT : array_base(t)->size; + const m_uint size = depth > 1 ? SZ_INT : array_base(t)->actual_size ?: array_base(t)->size; //ARRAY(a) = new_m_vector(p, size, length); m_vector_init(ARRAY(a), size, length); return a;