#ifndef ARRAY_H
#define ARRAY_H

#include "triangle.h"
#define array_push(array, value)                                              \
    do {                                                                      \
        (array) = array_hold((array), 1, sizeof(*(array)));                   \
        (array)[array_length(array) - 1] = (value);                           \
    } while (0);

void* array_hold(void* array, int count, int item_size);
int array_length(void* array);
void array_free(void* array);
void arr_swap(triangle_t *array, int i, int j);
// I think int array[] is just syntax sugar for void* array as an array just decays to a pointer to the first value?
void avg_depth_bubble_sort(triangle_t array[], int item_size);

#endif
