Fumofumotris/source/fumoengine/include/vector.h
Julia 62b37ed348 hj
kj
2024-05-07 17:10:15 -05:00

26 lines
475 B
C

#include "fumocommon.h"
#define VECTOR_T(VEC_ITEM_T) \
(&(struct VectorT) { \
.SIZE = sizeof(VEC_ITEM_T) \
}) \
typedef const struct VectorT {
usize SIZE;
} *const VectorT;
struct Vector {
usize len;
usize capacity;
void *array;
};
bool CreateVector(VectorT T, struct Vector *vec);
void FreeVector(struct Vector *vec);
void *VectorGet(VectorT T, struct Vector *vec, usize i);
bool VectorAdd(VectorT T, struct Vector *vec, void *item);