2021-02-01 22:06:37 +00:00
|
|
|
#ifndef LIBFLINT_STACK_H
|
|
|
|
#define LIBFLINT_STACK_H
|
|
|
|
|
2023-07-12 18:32:21 +00:00
|
|
|
#include "linkedlist.h"
|
2021-02-01 22:06:37 +00:00
|
|
|
|
|
|
|
#define Stack List
|
|
|
|
|
2022-03-28 17:52:16 +00:00
|
|
|
void stack_init(Stack *stack, void (*destroy)(void *data));
|
|
|
|
|
|
|
|
void stack_destroy(Stack *stack);
|
|
|
|
|
|
|
|
int stack_push(Stack *stack, void *data);
|
|
|
|
|
2021-02-01 22:27:01 +00:00
|
|
|
void *stack_peek(Stack *stack);
|
2022-03-28 17:52:16 +00:00
|
|
|
|
2021-02-01 22:27:01 +00:00
|
|
|
int stack_pop(Stack *stack, void **data);
|
2021-02-01 22:06:37 +00:00
|
|
|
|
|
|
|
#endif
|