Skip to content

Commit

Permalink
🎨 Context name
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Jun 6, 2019
1 parent f28b33f commit 67cfe8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/oo/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

ANN static void free_context(const Context a, Gwion gwion) {
REM_REF(a->nspc, gwion)
xfree(a->name);
mp_free(gwion->mp, Context, a);
}

ANN2(2) Context new_context(MemPool p, const Ast ast, const m_str str) {
const Context context = mp_calloc(p, Context);
context->nspc = new_nspc(p, str);
context->name = strdup(str);
context->nspc = new_nspc(p, context->name);
context->tree = ast;
context->name = str;
context->ref = new_refcount(p, free_context);
return context;
}
Expand Down

0 comments on commit 67cfe8e

Please sign in to comment.