From: fennecdjay Date: Tue, 26 Jul 2022 16:35:49 +0000 (+0200) Subject: :bug: Fix cleaning X-Git-Tag: nightly~264^2~76 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=a4fd4c4b493a0083a28f51b99f15bdfd59199b53;p=gwion.git :bug: Fix cleaning --- diff --git a/src/env/env.c b/src/env/env.c index 2f13a128..ded3a4f7 100644 --- a/src/env/env.c +++ b/src/env/env.c @@ -81,8 +81,8 @@ ANN void env_add_effect(const Env a, const Symbol effect, const loc_t pos) { } ANN void free_env(const Env a) { - free_env_scope(a->scope, a->gwion); pop_global(a->gwion); + free_env_scope(a->scope, a->gwion); mp_free(a->gwion->mp, Env, a); } diff --git a/src/gwion.c b/src/gwion.c index 4ca0239d..1c28cca0 100644 --- a/src/gwion.c +++ b/src/gwion.c @@ -243,7 +243,8 @@ ANN void push_global(struct Gwion_ *gwion, const m_str name) { } ANN void pop_global(const Gwion gwion) { - Nspc nspc = gwion->env->global_nspc, parent; + Nspc nspc = gwion->env->global_nspc->parent, parent; +// Nspc nspc = gwion->env->global_nspc, parent; do { parent = nspc->parent; nspc_remref(nspc, gwion);