summaryrefslogtreecommitdiff
path: root/src/pool.c
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@complang.org>2015-10-05 10:17:34 -0400
committerAdrian Thurston <thurston@complang.org>2015-10-05 11:14:34 -0400
commitf19e2b452e5dc2a14a48fe71fa26796b5678b147 (patch)
tree7bd712dfe233202d4adcdbaf95f92f5c99d116f4 /src/pool.c
parent13d7c884e2a855418d68b8e45041b8ab4a20a85c (diff)
downloadcolm-f19e2b452e5dc2a14a48fe71fa26796b5678b147.tar.gz
put parse tree allocator struct into pda_run as a pointer, allowing override
Diffstat (limited to 'src/pool.c')
-rw-r--r--src/pool.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/pool.c b/src/pool.c
index d5da6ab5..916a50c8 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -176,24 +176,24 @@ long tree_num_lost( program_t *prg )
* parse_tree_t
*/
-parse_tree_t *parse_tree_allocate( program_t *prg )
+parse_tree_t *parse_tree_allocate( struct pda_run *pda_run )
{
- return (parse_tree_t*) pool_alloc_allocate( &prg->parse_tree_pool );
+ return (parse_tree_t*) pool_alloc_allocate( pda_run->parse_tree_pool );
}
-void parse_tree_free( program_t *prg, parse_tree_t *el )
+void parse_tree_free( struct pda_run *pda_run, parse_tree_t *el )
{
- pool_alloc_free( &prg->parse_tree_pool, el );
+ pool_alloc_free( pda_run->parse_tree_pool, el );
}
-void parse_tree_clear( program_t *prg )
+void parse_tree_clear( struct pool_alloc *pool_alloc )
{
- pool_alloc_clear( &prg->parse_tree_pool );
+ pool_alloc_clear( pool_alloc );
}
-long parse_tree_num_lost( program_t *prg )
+long parse_tree_num_lost( struct pool_alloc *pool_alloc )
{
- return pool_alloc_num_lost( &prg->parse_tree_pool );
+ return pool_alloc_num_lost( pool_alloc );
}
/*