Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sundown-ffi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/stack.h')
-rw-r--r--src/stack.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/stack.h b/src/stack.h
new file mode 100644
index 0000000..08ff030
--- /dev/null
+++ b/src/stack.h
@@ -0,0 +1,29 @@
+#ifndef STACK_H__
+#define STACK_H__
+
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct stack {
+ void **item;
+ size_t size;
+ size_t asize;
+};
+
+void stack_free(struct stack *);
+int stack_grow(struct stack *, size_t);
+int stack_init(struct stack *, size_t);
+
+int stack_push(struct stack *, void *);
+
+void *stack_pop(struct stack *);
+void *stack_top(struct stack *);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif