From: Jérémie Astor Date: Sun, 22 Nov 2020 23:17:16 +0000 (+0100) Subject: :art: Improve text_api X-Git-Tag: nightly~1140^2~11 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=a8c854304a6403fc45e75cb20593e0c4d9d94f0d;p=gwion.git :art: Improve text_api --- 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