From 58534670f80000ef0671ecfa1a6181d87b1e083a Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Mon, 1 Dec 2025 19:24:12 +0100 Subject: [PATCH] rename ifdefs --- _allocator_impl.c | 2 +- cig.h | 10 +++++----- scratch.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_allocator_impl.c b/_allocator_impl.c index e528331..c3470fe 100644 --- a/_allocator_impl.c +++ b/_allocator_impl.c @@ -1,5 +1,5 @@ // This is used to have a single file that implements the allocators when all // the test files are compiled together. -#define ALLOCATOR_IMPLEMENTATION +#define CIG_IMPL #include "cig.h" diff --git a/cig.h b/cig.h index 04bb28f..e9ed84f 100644 --- a/cig.h +++ b/cig.h @@ -1,5 +1,5 @@ -#ifndef ALLOCATOR_H -#define ALLOCATOR_H +#ifndef CIG_H +#define CIG_H #include #include @@ -242,7 +242,7 @@ void dyn_array_destroy(void *this); #define dyn_array_pop(THIS) (dyn_array_shrink(THIS, 1), THIS[dyn_array_length(THIS)]) -#ifdef ALLOCATOR_IMPLEMENTATION +#ifdef CIG_IMPL void *allocator_alloc_func(allocator_t this, size_t bytes, const char *file, int line) { return this.vtbl->alloc(this.this, bytes, file, line); @@ -260,5 +260,5 @@ void allocator_free_func(allocator_t this, void *ptr, const char *file, int line #include "dyn_array.c" #include "arena_allocator.c" -#endif // ALLOCATOR_IMPLEMENTATION -#endif // ALLOCATOR_H +#endif // CIG_IMPL +#endif // CIG_H diff --git a/scratch.c b/scratch.c index dec9d04..c40d95e 100644 --- a/scratch.c +++ b/scratch.c @@ -1,4 +1,4 @@ -#define ALLOCATOR_IMPLEMENTATION +#define CIG_IMPL #include "cig.h" #include #include