Files
Compound/Stack/include/stack.h
William 5f7a6c6f93 (SOC) Storage Only Commit
(ADD) Name, NameScope, Catlog, Object, String, Attribute, Char, Registry, Utils, Type, <Platform Support>, <Global Constants>, README

(MOD) Array, Var, Status, MemMan, <Common>
2024-05-16 00:04:42 +08:00

19 lines
367 B
C

#ifndef STACK_H
# define STACK_H
# include <Compound/var.h>
# include <Compound/status.h>
typedef struct {
Var *members;
int len;
} Stack;
Status Stack_Create(Stack *inst, int len);
Status Stack_CopyOf(Stack *inst, Stack *other);
Status Stack_Push(Stack *inst, Var *item);
Status Stack_Pop(Stack *inst);
bool Stack_IsEmpty(Stack *inst);
#endif /* STACK_H */