skopy/lib/include/vec.h

24 lines
397 B
C

#ifndef SK_VEC_H
#define SK_VEC_H
#include <stdlib.h>
#include <assert.h>
struct vec
{
size_t size;
size_t capacity;
void** data;
};
void vec_init(struct vec* self);
void vec_free_elements(struct vec* self,
void (*destructor)(void*));
void vec_free(struct vec* self);
void vec_push(struct vec* self, void* element);
void* vec_pop(struct vec* self);
#endif