From 7ddd7707db6cc6d186c474a64b610e42ab9d85bd Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Fri, 17 Apr 2026 15:00:47 +0200 Subject: [PATCH] still nothing --- foobar.c | 2 +- justfile | 2 +- map.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/foobar.c b/foobar.c index 3038f4a..0be0ea6 100644 --- a/foobar.c +++ b/foobar.c @@ -6,7 +6,7 @@ int main() { int *ints; set_init(&ints, allocator, .initial_capacity=20); map_print_mapping_state(ints, stdout); - for ( int i = 0; i < 100; i++ ) { + for ( int i = 0; i < 1000; i++ ) { set_add(&ints, i); map_print_mapping_state(ints, stdout); } diff --git a/justfile b/justfile index 213bc7e..f870ced 100644 --- a/justfile +++ b/justfile @@ -11,7 +11,7 @@ run_foobar: build_foobar ./{{FOOBAR}} build_foobar: - {{CC}} ./foobar.c -o {{FOOBAR}} + {{CC}} ./foobar.c -o {{FOOBAR}} {{CFLAGS}} clean_foobar: rm {{FOOBAR}} diff --git a/map.c b/map.c index 2cb9edd..faf9418 100644 --- a/map.c +++ b/map.c @@ -201,7 +201,7 @@ index_pair_t map_pair_hash(void *this, void *pair) { void map_assure_growable_by_1(void **this, const char *file, int line) { map_header_t *header = PTR_FROM_FIELD_PTR(map_header_t, bytes, *this); unsigned int new_n_items = header->n_items + 1; - if (new_n_items <= header->mapping_capacity) { + if (new_n_items <= header->capacity) { return; }