aboutsummaryrefslogtreecommitdiff
path: root/src/vector.h
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-05 19:45:02 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-05 19:45:02 +0300
commit975465c3f5302117eef779672ada76627371c3bf (patch)
tree25e47f898ff4a2c3177e1979febc269ed4e719fd /src/vector.h
parenta986818ad798d50f41d9e1fd569c926a67341b6e (diff)
downloadunja-975465c3f5302117eef779672ada76627371c3bf.tar.gz
unja-975465c3f5302117eef779672ada76627371c3bf.zip
Hashmap improvements and include guards
Hashmap capacity can be set programmatically and it grows/shrinks in size when the load increases/decreases to avoid collisions/save memory.
Diffstat (limited to 'src/vector.h')
-rw-r--r--src/vector.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vector.h b/src/vector.h
index e4a912a..0a7c297 100644
--- a/src/vector.h
+++ b/src/vector.h
@@ -1,3 +1,6 @@
+#ifndef UNJA_VECTOR_H
+#define UNJA_VECTOR_H
+
#include <stdlib.h>
struct vector {
@@ -7,5 +10,9 @@ struct vector {
};
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
+
+void vector_free(struct vector *vec);
+
+#endif