BCI-dev/interpreter/stack.h

21 lines
378 B
C

#ifndef bci_stack_h__
#define bci_stack_h__
#include <inttypes.h>
typedef struct bci_stack_s
{
struct bci_stack_s * next;
uint16_t value;
} * bci_stack_t;
char bci_stack_t_push(bci_stack_t * stack, uint16_t value);
char bci_stack_t_pop(bci_stack_t * stack, uint16_t * result);
/*
* Deletes the entire (!) stack.
*
* */
void bci_stack_t_del(bci_stack_t * stack);
#endif