simple header file for dynamic arrays that you can include in your code.
- TYPE
string:char* - TYPE
byte:unsigned char - TYPE
bool:byte (unsigned char) - TYPE
ull:unsigned long long - MACRO
CAT(x, y): Adds two words together. Used for building function names. - MACRO
sanity(var): Calls memoryFailure if the variable isNULL. - MACRO
zmalloc(size): Allocates memory with safety checks in place. - MACRO
zrealloc(ptr, size): Reallocates memory with safety checks in place. - MACRO
__create_primitive(type, lname): Creates a dynamic array type with a custom name. - MACRO
__create_list_type(type): Creates a dynamic array type with the name of{type}_list. - FUNCTION
memoryFailure(file, line): Prints a notice and exits. To be used withsanity.
- TYPE
{type}_list: Struct withull sizeandtype *arr. - FUNCTION
create_{type}_list(): Creates a dynamic list. - FUNCTION
push_{type}_list({type}_list *list, type item): Pushes an item to the end of the array. - FUNCTION
append_{type}_list({type}_list *list, ull index, type value): Pushes an item to a specified index of the array. - FUNCTION
remove_{type}_list({type}_list *list, ull index): Removes an item from a specified index of the array.