2021-02-01 14:06:37 -08:00
|
|
|
#ifndef LIBFLINT_STACK_H
|
|
|
|
#define LIBFLINT_STACK_H
|
|
|
|
|
2023-11-29 13:40:41 -08:00
|
|
|
#include "lflinkedlist.h"
|
2021-02-01 14:06:37 -08:00
|
|
|
|
|
|
|
#define Stack List
|
|
|
|
|
2022-03-28 10:52:16 -07: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 14:27:01 -08:00
|
|
|
void *stack_peek(Stack *stack);
|
2022-03-28 10:52:16 -07:00
|
|
|
|
2021-02-01 14:27:01 -08:00
|
|
|
int stack_pop(Stack *stack, void **data);
|
2021-02-01 14:06:37 -08:00
|
|
|
|
|
|
|
#endif
|