567 * |
567 * |
568 * Determining equality is performed by the list's comparator function. |
568 * Determining equality is performed by the list's comparator function. |
569 * |
569 * |
570 * @param list the list |
570 * @param list the list |
571 * @param elem the element to find |
571 * @param elem the element to find |
572 * @return the index of the element or \c (size+1) if the element is not found |
572 * @return the index of the element or a negative |
573 */ |
573 * value when the element is not found |
574 __attribute__((__nonnull__)) |
574 */ |
575 static inline size_t cxListFind( |
575 __attribute__((__nonnull__)) |
|
576 static inline ssize_t cxListFind( |
576 CxList const *list, |
577 CxList const *list, |
577 void const *elem |
578 void const *elem |
578 ) { |
579 ) { |
579 return list->cl->find(list, elem); |
580 return list->cl->find(list, elem); |
580 } |
581 } |