summaryrefslogtreecommitdiff
path: root/data_structures.c
diff options
context:
space:
mode:
Diffstat (limited to 'data_structures.c')
-rw-r--r--data_structures.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/data_structures.c b/data_structures.c
index 7580a92..8efa124 100644
--- a/data_structures.c
+++ b/data_structures.c
@@ -88,12 +88,12 @@ static void arr_cleara_(void **arr, size_t size, Allocator *allocr) {
}
}
-/* does NOT shrink the array! */
static void arr_set_len_(void **arr, size_t n, size_t item_sz) {
if (n > arr_len(*arr)) {
arr_resv_(arr, n, item_sz);
}
arr_hdr(*arr)->len = n;
+ /* OPTIM: shrink */
}
static void arr_set_lena_(void **arr, size_t n, size_t item_sz, Allocator *a) {
arr_resva_(arr, n, item_sz, a);
@@ -229,6 +229,8 @@ static void arr_test(void) {
}
#endif
+/* string hash table. entries are zero initialized (toc stuff depends on this!) */
+
static U64 str_hash(const char *s, size_t len) {
U32 x = 0xabcdef01;
U32 y = 0x31415926;