mirror of
https://github.com/bkthomps/Containers.git
synced 2025-11-16 12:34:47 +00:00
Reduce malloc calls in stack (#78)
This commit is contained in:
@@ -455,13 +455,13 @@ deque deque_destroy(deque me);
|
||||
* The stack data structure, which adapts a container to provide a stack
|
||||
* (last-in first-out). Adapts the deque container.
|
||||
*/
|
||||
typedef struct internal_stack *stack;
|
||||
typedef struct internal_deque *stack;
|
||||
|
||||
/* Starting */
|
||||
stack stack_init(size_t data_size);
|
||||
|
||||
/* Utility */
|
||||
int stack_size(stack me);
|
||||
size_t stack_size(stack me);
|
||||
int stack_is_empty(stack me);
|
||||
int stack_trim(stack me);
|
||||
void stack_copy_to_array(void *arr, stack me);
|
||||
|
||||
Reference in New Issue
Block a user