39 typedef struct _void_stack
42 unsigned short max_size;
48 typedef struct _void_stack_iterator
XXX: document this.
Definition: void_stack.h:49
XXX: document this.
Definition: void_stack.h:40
void_stack * void_stack_new(unsigned short max_size)
Allocates a new void_stack.
Definition: void_stack.c:27
void_stack * void_stack_copy_reverse(const void_stack *v)
Makes a shallow copy of void_stack in reverse order.
Definition: void_stack.c:72
unsigned short void_stack_size(const void_stack *stack)
Query the current number of elements on a void_stack()
Definition: void_stack.c:106
const void * void_stack_cur(const void_stack *stack)
Returns a pointer to the current element on the top of the stack.
Definition: void_stack.c:138
bool void_stack_push(void_stack *stack, void *e)
Puts a new element on the top of a void_stack.
Definition: void_stack.c:126
void void_stack_free(void_stack *stack)
Frees the memory associated with a void_stack, but not the elements held on the stack.
Definition: void_stack.c:91
void void_stack_iterator_free(void_stack_iterator *iter)
Frees a void_stack_iterator.
Definition: void_stack.c:167
const void * void_stack_iterator_next(void_stack_iterator *iter)
Returns a pointer to the the next element in the stack.
Definition: void_stack.c:173
void_stack_iterator * void_stack_iterator_new(const void_stack *stack)
Creates a new iterator for the specified void_stack.
Definition: void_stack.c:149
void * void_stack_pop(void_stack *stack)
Removes the top element on a void_stack and returns a reference to it.
Definition: void_stack.c:112
void_stack * void_stack_copy(const void_stack *v)
Makes a shallow copy of void_stack.
Definition: void_stack.c:53
void void_stack_free_deep(void_stack *stack)
Frees the memory associated with a void_stack and the elements referenced by the stack.
Definition: void_stack.c:97