From 4ae6c052764767f8281576a4ed938e1d6cf7c688 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 5 Nov 2023 16:21:09 +0000 Subject: Current work on preprocessor implementation Lots to refactor and test --- lib/darr.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/darr.h') diff --git a/lib/darr.h b/lib/darr.h index 1d5820b..02938da 100644 --- a/lib/darr.h +++ b/lib/darr.h @@ -24,8 +24,9 @@ typedef struct size_t used, available; } darr_t; -#define DARR_DEFAULT_SIZE 8 -#define DARR_REALLOC_MULT 1.5 +#define DARR_DEFAULT_SIZE 8 +#define DARR_REALLOC_MULT 1.5 +#define DARR_AT(TYPE, DARR_DATA, IND) ((TYPE *)(DARR_DATA))[(IND)] void darr_init(darr_t *, size_t); void darr_ensure_capacity(darr_t *, size_t); -- cgit v1.2.3-13-gbd6f