|
Cthulhu
0.2.10
Cthulhu compiler collection
|

Go to the source code of this file.
Data Structures | |
| struct | vector_t |
| a generic vector of pointers More... | |
Macros | |
| #define | CHECK_VECTOR(vector) |
| #define | VEC (*vector) |
Functions | |
| STA_DECL vector_t * | vector_new (size_t size, arena_t *arena) |
| create a new vector with an initial capacity More... | |
| STA_DECL vector_t * | vector_of (size_t len, arena_t *arena) |
| create a new vector with a specified length More... | |
| STA_DECL vector_t * | vector_init (void *value, arena_t *arena) |
| create a new vector with a single initial value More... | |
| STA_DECL vector_t * | vector_clone (vector_t *vector) |
| clone a vector More... | |
| STA_DECL void | vector_delete (vector_t *vector) |
| STA_DECL void | vector_push (vector_t **vector, void *value) |
| push a value onto the end of a vector More... | |
| STA_DECL void | vector_drop (vector_t *vector) |
| pop a value from the end of a vector More... | |
| STA_DECL void | vector_set (vector_t *vector, size_t index, void *value) |
| set a value in a vector More... | |
| STA_DECL void * | vector_get (const vector_t *vector, size_t index) |
| get a value from a vector More... | |
| STA_DECL void * | vector_tail (const vector_t *vector) |
| get the last element of a vector More... | |
| STA_DECL size_t | vector_len (const vector_t *vector) |
| get the length of a vector More... | |
| STA_DECL size_t | vector_find (vector_t *vector, const void *element) |
| find an element in a vector searches via pointer equality More... | |
| STA_DECL void | vector_append (vector_t **vector, const vector_t *other) |
append the contents of one vector to another this copies the contents of other into vector More... | |
| STA_DECL void | vector_reset (vector_t *vec) |
| reset the contents of a vector More... | |
| STA_DECL void ** | vector_data (vector_t *vec) |
| get the data of a vector More... | |
Variables | |
| vector_t | gEmptyVector = { NULL, 0, 0 } |
| a global empty vector used to avoid allocating alot of empty vectors More... | |
| const vector_t | kEmptyVector = { NULL, 0, 0 } |
| a global empty vector used to avoid allocating alot of empty vectors More... | |
| #define CHECK_VECTOR | ( | vector | ) |