aboutsummaryrefslogtreecommitdiff
path: root/src/vector.h
diff options
context:
space:
mode:
authorDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-12 15:07:09 +0100
committerDanny van Kooten <dannyvankooten@users.noreply.github.com>2020-03-12 15:07:09 +0100
commit791e03d8199fa1177f970f45a8a436912d229d1c (patch)
treebd24f5ad87bca8e932e9db8176d46a31d578c43c /src/vector.h
parenta39e8c713e0a8ea9f2f8e455c1ce2b4d0c3f5115 (diff)
downloadunja-791e03d8199fa1177f970f45a8a436912d229d1c.tar.gz
unja-791e03d8199fa1177f970f45a8a436912d229d1c.zip
add vector type
Diffstat (limited to 'src/vector.h')
-rw-r--r--src/vector.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vector.h b/src/vector.h
new file mode 100644
index 0000000..e4a912a
--- /dev/null
+++ b/src/vector.h
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+
+struct vector {
+ void **values;
+ int size;
+ int cap;
+};
+
+struct vector* vector_new(int cap);
+int vector_push(struct vector *vec, void *value);
+void vector_free(struct vector *vec); \ No newline at end of file