--- a/src/cx/collection.h Thu Oct 30 19:27:18 2025 +0100 +++ b/src/cx/collection.h Sat Nov 01 19:31:48 2025 +0100 @@ -154,6 +154,14 @@ #define cxCollectionSorted(c) ((c)->collection.sorted || (c)->collection.size == 0) /** + * Sets the compare function for a collection. + * + * @param c a pointer to a struct that contains #CX_COLLECTION_BASE + * @param func (@c cx_compare_func) the compare function that shall be used by @c c + */ +#define cxCollectionCompareFunc(c, func) (c)->collection.cmpfunc = (func) + +/** * Sets a simple destructor function for this collection. * * @param c a pointer to a struct that contains #CX_COLLECTION_BASE