blob: 0b53f95f6e63cc5f46126c668b35e3ec9a505846 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef ARRAY_H
#define ARRAY_H
#include <stdlib.h>
#define DEFAULT_ARR_LEN 10
typedef struct {
void **items;
size_t size;
size_t capacity;
} array_t;
array_t *init_array();
void array_push(array_t *a, void *item);
void *array_pop(array_t *a);
void *array_del(array_t *a, unsigned int ind);
void array_free(void *a, void (*freefunc)(void *));
#endif
|