aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-05 16:21:09 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-05 16:21:09 +0000
commit4ae6c052764767f8281576a4ed938e1d6cf7c688 (patch)
treef47a2b3557858065ce2d96d2d548e0b1216aad56 /lib
parentaadb21853a0defc9aeac55ee2f4d582ba0c52cf4 (diff)
downloadovm-4ae6c052764767f8281576a4ed938e1d6cf7c688.tar.gz
ovm-4ae6c052764767f8281576a4ed938e1d6cf7c688.tar.bz2
ovm-4ae6c052764767f8281576a4ed938e1d6cf7c688.zip
Current work on preprocessor implementation
Lots to refactor and test
Diffstat (limited to 'lib')
-rw-r--r--lib/darr.h5
1 files changed, 3 insertions, 2 deletions
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);