thread context scratch system; converge on transition idiom in sample code

This commit is contained in:
Allen Webster
2021-07-21 16:03:39 -07:00
parent c6df111fb1
commit 37484ea0a6
15 changed files with 120 additions and 92 deletions
+3 -1
View File
@@ -704,8 +704,10 @@ MD_C_Generate_Decl(FILE *file, MD_Node *node)
{
if(node)
{
MD_C_Expr *type = MD_C_ParseAsType(MD_Scratch(), node->first_child, node->last_child);
MD_ArenaTemp scratch = MD_GetScratch(0, 0);
MD_C_Expr *type = MD_C_ParseAsType(scratch.arena, node->first_child, node->last_child);
MD_C_Generate_DeclByNameAndType(file, node->string, type);
MD_ReleaseScratch(scratch);
}
}