From ae0d392d436c6ce3102e93713a65a2e4383bc4a2 Mon Sep 17 00:00:00 2001 From: dzaima Date: Wed, 14 Aug 2024 05:00:14 +0300 Subject: [PATCH] tyarrv_free --- src/core/stuff.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/stuff.h b/src/core/stuff.h index a16324c5..61d55d34 100644 --- a/src/core/stuff.h +++ b/src/core/stuff.h @@ -46,6 +46,9 @@ extern INIT_GLOBAL M_FillF fillFns[el_MAX]; #define WRAP(X,IA,MSG) ({ i64 wV=(i64)(X); u64 iaW=(IA); if(RARE((u64)wV >= iaW)) { if(wV<0) wV+= iaW; if((u64)wV >= iaW) {MSG;} }; (usz)wV; }) +static void tyarrv_freeP(Arr* x) { assert(PRNK(x)<=1 && IS_DIRECT_TYARR(PTY(x))); mm_free((Value*)x); } +static void tyarrv_free(B x) { tyarrv_freeP(a(x)); } + static inline void* m_arrUnchecked(u64 sz, u8 type, usz ia) { Arr* r = mm_alloc(sz, type); r->ia = ia;