aisd_lab/lab01/zad1/include/stack.h

18 lines
366 B
C

#ifndef _KIK_ZAD1_STACK_H
#define _KIK_ZAD1_STACK_H
#include <stdbool.h>
#include <stddef.h>
typedef struct Stack Stack;
Stack *stack_new(size_t size, size_t element_size);
void stack_free(Stack *stack);
// The caller must free the return value after use.
void *stack_pop(Stack *stack);
bool stack_push(Stack *stack, void *value);
#endif // _KIK_ZAD1_STACK_H