From 111a1c8b9f4bafb627dd3911857943ae9a65f294 Mon Sep 17 00:00:00 2001 From: Mistivia Date: Wed, 18 Jun 2025 20:55:19 +0800 Subject: vector len --- Makefile | 2 +- src/vec.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 87a6694..3811231 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ $(tests_bin):%.bin:%.c libalgds.a $(cc) $(cflags) -Isrc/ $< libalgds.a -MD -MF $@.d -o $@ clean: - -rm build/ + -rm -rf build/ -rm $(shell find tests/ -name '*.bin') -rm $(shell find . -name '*.o' -or -name '*.a' -or -name '*.d') diff --git a/src/vec.h b/src/vec.h index ccc0f6a..faa314a 100644 --- a/src/vec.h +++ b/src/vec.h @@ -95,6 +95,7 @@ } \ fprintf(fp, "]"); \ } \ + size_t T##Vector_len(T##Vector *self) { return self->size; } \ void T##Vector_free(T##Vector *self) { free(self->buffer); } VECTOR_DEF(Int); -- cgit v1.0