mirror of https://git.zx2c4.com/cgit/
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
292 B
C
18 lines
292 B
C
14 years ago
|
#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 */
|