1.1 --- a/src/cx/compare.h Sat Dec 30 18:48:25 2023 +0100 1.2 +++ b/src/cx/compare.h Sun Dec 31 14:29:46 2023 +0100 1.3 @@ -42,6 +42,17 @@ 1.4 extern "C" { 1.5 #endif 1.6 1.7 +#ifndef CX_COMPARE_FUNC_DEFINED 1.8 +#define CX_COMPARE_FUNC_DEFINED 1.9 +/** 1.10 + * A comparator function comparing two collection elements. 1.11 + */ 1.12 +typedef int(*cx_compare_func)( 1.13 + void const *left, 1.14 + void const *right 1.15 +); 1.16 +#endif // CX_COMPARE_FUNC_DEFINED 1.17 + 1.18 /** 1.19 * Compares two integers of type int. 1.20 *