summaryrefslogtreecommitdiff
path: root/include/engine/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/engine/stack.h')
-rw-r--r--include/engine/stack.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/engine/stack.h b/include/engine/stack.h
index 636c306..69975df 100644
--- a/include/engine/stack.h
+++ b/include/engine/stack.h
@@ -28,22 +28,23 @@
#include "types.h"
typedef struct {
- isize head; /* current number of elements */
+ isize head; /* current number of elements */
const usize elem_size; /* size in bytes of each element */
- usize size; /* current memory size used by the stack */
- const usize chunk_size; /* size of which the stack increases when running out of mem */
- void *data; /* memory buffer */
+ usize size; /* current memory size used by the stack */
+ const usize chunk_size; /* size of which the stack increases when running out
+ of mem */
+ void* data; /* memory buffer */
} Stack;
Stack stack_new_ex(const usize element_size, const usize size);
Stack stack_new(const usize element_size);
-void stack_free(Stack *s);
-void *stack_pop(Stack *s);
-void stack_push(Stack *s, void *elem);
-void *stack_peek(Stack *s);
-isize stack_size(const Stack *s);
-void stack_swap(Stack *s, Stack *t);
+void stack_free(Stack* s);
+void* stack_pop(Stack* s);
+void stack_push(Stack* s, void* elem);
+void* stack_peek(Stack* s);
+isize stack_size(const Stack* s);
+void stack_swap(Stack* s, Stack* t);
#endif