update justfile to not make so much garbage

This commit is contained in:
2026-05-06 20:52:46 +02:00
parent 7bbe0747c5
commit 1c19b4435c
2 changed files with 12 additions and 6 deletions
+11 -5
View File
@@ -5,26 +5,32 @@ LDFLAGS := if os() == "macos" {
} else { } else {
"-lcriterion" "-lcriterion"
} }
TESTBIN := "/tmp/all_tests"
TMP := "/tmp"
TESTBIN := TMP/"all_tests"
set shell := ["bash", "-cu"] set shell := ["bash", "-cu"]
FOOBAR := "foobar" FOOBAR := "foobar"
FOOBAR_SOURCE := FOOBAR+".c" FOOBAR_SOURCE := FOOBAR+".c"
FOOBAR_EXPANDED := FOOBAR+"-expanded.c" FOOBAR_BIN := TMP/FOOBAR
FOOBAR_EXPANDED := TMP/FOOBAR+"-expanded.c"
run_foobar: build_foobar run_foobar: build_foobar
./{{FOOBAR}} ./{{FOOBAR_BIN}}
build_foobar: foobar_expanded build_foobar: foobar_expanded
{{CC}} {{FOOBAR_EXPANDED}} -o {{FOOBAR}} {{CFLAGS}} {{CC}} {{FOOBAR_EXPANDED}} -o {{FOOBAR_BIN}} {{CFLAGS}}
echo "{{FOOBAR_BIN}}"
foobar_expanded: foobar_expanded:
{{CC}} -P -E {{FOOBAR_SOURCE}} -o {{FOOBAR_EXPANDED}} {{CC}} -P -E {{FOOBAR_SOURCE}} -o {{FOOBAR_EXPANDED}}
clang-format -i {{FOOBAR_EXPANDED}} clang-format -i {{FOOBAR_EXPANDED}}
clean_foobar: clean_foobar:
rm {{FOOBAR}} rm {{FOOBAR_BIN}}
[default] [default]
test: build test: build
+1 -1
View File
@@ -234,7 +234,7 @@ void map_assure_growable_by_1(void **this, const char *file, int line) {
// The reason for re-hashing is that all hashes are moduloed by the // The reason for re-hashing is that all hashes are moduloed by the
// size of the mapping array, so the resulting hash will likely change. // size of the mapping array, so the resulting hash will likely change.
for ( unsigned int i = 0; i < header->n_items; i++ ) { for ( unsigned int i = 0; i < header->n_items; i++ ) {
void *pair = &(*this)[i*header->item_size]; void *pair = &((uint8_t *)(*this))[i*header->item_size];
// This is okay, because we absolutely know that the keys don't already // This is okay, because we absolutely know that the keys don't already
// exist. (assuming all the other code for map is doing it's job) // exist. (assuming all the other code for map is doing it's job)