cgitsb/vector.h
Lars Hjemli 958a95b378 Add vector utility functions
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
2010-11-10 00:22:41 +01:00

18 line
292 B
C

#ifndef CGIT_VECTOR_H
#define CGIT_VECTOR_H
#include <stdlib.h>
struct vector {
size_t size;
size_t count;
size_t alloc;
void *data;
};
#define VECTOR_INIT(type) {sizeof(type), 0, 0, NULL}
int vector_push(struct vector *vec, const void *data, int gently);
#endif /* CGIT_VECTOR_H */