diff options
author | Adrian Thurston <thurston@complang.org> | 2015-10-05 10:17:34 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-10-05 11:14:34 -0400 |
commit | f19e2b452e5dc2a14a48fe71fa26796b5678b147 (patch) | |
tree | 7bd712dfe233202d4adcdbaf95f92f5c99d116f4 /src/pool.c | |
parent | 13d7c884e2a855418d68b8e45041b8ab4a20a85c (diff) | |
download | colm-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.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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 ); } /* |