1.1 --- a/src/cx/compare.h Sat Nov 26 16:58:41 2022 +0100 1.2 +++ b/src/cx/compare.h Wed Dec 07 20:11:44 2022 +0100 1.3 @@ -180,17 +180,36 @@ 1.4 * @return -1, if *d1 is less than *d2, 0 if both are equal, 1.5 * 1 if *d1 is greater than *d2 1.6 */ 1.7 -int cx_cmp_double(void const *d1, void const *d2); 1.8 +int cx_cmp_double( 1.9 + void const *d1, 1.10 + void const *d2 1.11 +); 1.12 1.13 /** 1.14 - * Compares two pointers. 1.15 + * Compares the integer representation of two pointers. 1.16 * 1.17 - * @param ptr1 pointer one 1.18 - * @param ptr2 pointer two 1.19 - * @return -1 if ptr1 is less than ptr2, 0 if both are equal, 1.20 - * 1 if ptr1 is greater than ptr2 1.21 + * @param ptr1 pointer to pointer one (intptr_t const*) 1.22 + * @param ptr2 pointer to pointer two (intptr_t const*) 1.23 + * @return -1 if *ptr1 is less than *ptr2, 0 if both are equal, 1.24 + * 1 if *ptr1 is greater than *ptr2 1.25 */ 1.26 -int cx_cmp_ptr(void const *ptr1, void const *ptr2); 1.27 +int cx_cmp_intptr( 1.28 + void const *ptr1, 1.29 + void const *ptr2 1.30 +); 1.31 + 1.32 +/** 1.33 + * Compares the unsigned integer representation of two pointers. 1.34 + * 1.35 + * @param ptr1 pointer to pointer one (uintptr_t const*) 1.36 + * @param ptr2 pointer to pointer two (uintptr_t const*) 1.37 + * @return -1 if *ptr1 is less than *ptr2, 0 if both are equal, 1.38 + * 1 if *ptr1 is greater than *ptr2 1.39 + */ 1.40 +int cx_cmp_uintptr( 1.41 + void const *ptr1, 1.42 + void const *ptr2 1.43 +); 1.44 1.45 #ifdef __cplusplus 1.46 } // extern "C"