libflint/include/lfstack.h

19 lines
320 B
C
Raw Normal View History

2021-02-01 22:06:37 +00:00
#ifndef LIBFLINT_STACK_H
#define LIBFLINT_STACK_H
2023-11-29 21:40:41 +00:00
#include "lflinkedlist.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