Currently there's Vector_quickSort, Vector_quickSortCustomCompare, and Vector_insertionSort for sorting vectors.
Apply the Highlander rule and let there only be one: Vector_sort.
While at it, update the signatures to allow for context support in the comparison functions:
typedef int (*Object_SortFn)(const void *a, const void *b, void *ctx);
int Vector_sort(Vector *v, Object_SortFn cmp, void *ctx);
Note: The single replacement API MUST be a stable sorting algorithm internally to conserve behaviour of Vector_insertionSort.
Currently there's
Vector_quickSort,Vector_quickSortCustomCompare, andVector_insertionSortfor sorting vectors.Apply the Highlander rule and let there only be one:
Vector_sort.While at it, update the signatures to allow for context support in the comparison functions:
Note: The single replacement API MUST be a stable sorting algorithm internally to conserve behaviour of
Vector_insertionSort.