moka/lib/vec.h

21 lines
349 B
C

#ifndef MK_VEC_H
#define MK_VEC_H
#include "commons.h"
struct vec
{
size_t capacity;
size_t size;
void** data;
};
void vec_init(struct vec* self);
void vec_free_elements(struct vec* self, void (*func)(void*));
void vec_free(struct vec* self);
void vec_push(struct vec* self, void* element);
void* vec_pop(struct vec* self);
#endif