From a8c854304a6403fc45e75cb20593e0c4d9d94f0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 23 Nov 2020 00:17:16 +0100 Subject: [PATCH] :art: Improve text_api --- src/env/context.c | 2 +- src/env/value.c | 2 ++ util | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/env/context.c b/src/env/context.c index 0599442d..1ba288c7 100644 --- a/src/env/context.c +++ b/src/env/context.c @@ -8,7 +8,7 @@ ANN void free_context(const Context a, Gwion gwion) { nspc_remref(a->nspc, gwion); free_mstr(gwion->mp, a->name); if(a->docstr) - free_text(gwion->mp, a->docstr); + free_text(a->docstr); mp_free(gwion->mp, Context, a); } diff --git a/src/env/value.c b/src/env/value.c index dfbf80b8..86dfa6b7 100644 --- a/src/env/value.c +++ b/src/env/value.c @@ -14,6 +14,8 @@ ANN void free_value(Value a, Gwion gwion) { xfree(a->d.ptr); if(is_class(gwion, t)) type_remref(t, gwion); + if(a->docstr) + free_text(a->docstr); mp_free(gwion->mp, ValueFrom, a->from); mp_free(gwion->mp, Value, a); } diff --git a/util b/util index f732616e..011948c5 160000 --- a/util +++ b/util @@ -1 +1 @@ -Subproject commit f732616ebc13a148f01a09af6cf9adc176bcd24b +Subproject commit 011948c5a80f49af50d6e6a35aacd8e70eb53ec6 -- 2.43.0