2 * sparse/smatch_expression_stacks.c
4 * Copyright (C) 2009 Dan Carpenter.
6 * Licensed under the Open Software License version 1.1
11 #include "smatch_expression_stacks.h"
13 void push_expression(struct expression_list
**estack
, struct expression
*expr
)
15 add_ptr_list(estack
, expr
);
18 struct expression
*pop_expression(struct expression_list
**estack
)
20 struct expression
*expr
;
22 expr
= last_ptr_list((struct ptr_list
*)*estack
);
23 delete_ptr_list_last((struct ptr_list
**)estack
);
27 struct expression
*top_expression(struct expression_list
*estack
)
29 struct expression
*expr
;
31 expr
= last_ptr_list((struct ptr_list
*)estack
);
35 void free_expression_stack(struct expression_list
**estack
)
37 __free_ptr_list((struct ptr_list
**)estack
);