From 0b2ed69fbade8907e1aaa0f63a7b8fcac8ea13c8 Mon Sep 17 00:00:00 2001 From: dzaima Date: Sun, 23 Apr 2023 23:50:32 +0300 Subject: [PATCH] add a NOGC_E in mut_pfree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes >⟨"ab"‿1,"a"⟩ in debug builds unnecessarily breaking --- src/utils/mut.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/utils/mut.c b/src/utils/mut.c index ad419fd6..69024ea1 100644 --- a/src/utils/mut.c +++ b/src/utils/mut.c @@ -82,8 +82,12 @@ NOINLINE B vec_addN(B w, B x) { } NOINLINE void mut_pfree(Mut* m, usz n) { // free the first n elements - if (m->fns->elType==el_B) harr_pfree(taga(m->val), n); - else mm_free((Value*) m->val); + if (m->fns->elType==el_B) { + NOGC_E; + harr_pfree(taga(m->val), n); + } else { + mm_free((Value*) m->val); + } }