24 lines
425 B
C
24 lines
425 B
C
#ifndef CCM_VEC_H
|
|
#define CCM_VEC_H
|
|
|
|
#include "commons.h"
|
|
|
|
/**
|
|
* @file saze
|
|
**/
|
|
typedef struct {
|
|
size_t capacity;
|
|
size_t size;
|
|
void** data;
|
|
} vec_t;
|
|
|
|
void vec_init(vec_t* self);
|
|
void vec_free_elements(vec_t* self, void (*free_fun)(void*));
|
|
void vec_free(vec_t* self);
|
|
|
|
void vec_push(vec_t* self, void* value);
|
|
void* vec_pop(vec_t* self);
|
|
void vec_remove(vec_t* self, size_t idx, void (*free_fun)(void*));
|
|
|
|
#endif
|