refactor(ast): one file per ast_type -- FINISHED
This commit is contained in:
parent
38f5a35885
commit
30df2993ee
10 changed files with 85 additions and 51 deletions
|
|
@ -31,14 +31,15 @@ bool ast_is_if(struct ast *node)
|
|||
return node->type == AST_IF;
|
||||
}
|
||||
|
||||
void ast_free_if(struct ast_if *if_data)
|
||||
void ast_free_if(struct ast_if **if_data)
|
||||
{
|
||||
if (if_data == NULL)
|
||||
if (if_data == NULL || *if_data == NULL)
|
||||
return;
|
||||
|
||||
ast_free(if_data->condition);
|
||||
ast_free(if_data->then_clause);
|
||||
ast_free(if_data->else_clause);
|
||||
ast_free((*if_data)->condition);
|
||||
ast_free((*if_data)->then_clause);
|
||||
ast_free((*if_data)->else_clause);
|
||||
|
||||
free(if_data);
|
||||
free(*if_data);
|
||||
*if_data = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue