skopy/lib/include/vec.h

24 lines
397 B
C
Raw Permalink Normal View History

2024-03-31 21:10:56 +00:00
#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);
2024-03-31 23:32:47 +00:00
void* vec_pop(struct vec* self);
2024-03-31 21:10:56 +00:00
#endif