blob: a7e6690de07deb6a4b8fa1c0a9b5dcd6bd882e5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef CONTAINER_H
#define CONTAINER_H
#include "../sys/sizes.h"
typedef struct {
void *data;
u64 size;
u64 element_size;
u64 data_size;
} container_t;
container_t *new_container(u64 element_size);
void free_container(container_t *);
void container_push(container_t *, u64 value);
void container_erase(container_t *, u64 start, u64 end);
void container_resize(container_t *, u64 new_size);
u64 container_get(container_t *, u64 index);
void container_set(container_t *, u64 index, u64 data);
void container_merge(container_t *, container_t *);
void container_append(container_t *, void *, u64 size);
#endif
|