add single instance mode
[uwplayer.git] / ucx / cx / linked_list.h
index c0fc44e..1c942e3 100644 (file)
@@ -66,7 +66,7 @@ extern bool CX_DISABLE_LINKED_LIST_SWAP_SBO;
  */
 CxList *cxLinkedListCreate(
         CxAllocator const *allocator,
-        CxListComparator comparator,
+        cx_compare_func comparator,
         size_t item_size
 );
 
@@ -118,13 +118,13 @@ void *cx_linked_list_at(
  * @param loc_data the location of the \c data pointer within your node struct
  * @param cmp_func a compare function to compare \p elem against the node data
  * @param elem a pointer to the element to find
- * @return the index of the element or a past-one index if the element could not be found
+ * @return the index of the element or a negative value if it could not be found
  */
-size_t cx_linked_list_find(
+ssize_t cx_linked_list_find(
         void const *start,
         ptrdiff_t loc_advance,
         ptrdiff_t loc_data,
-        CxListComparator cmp_func,
+        cx_compare_func cmp_func,
         void const *elem
 ) __attribute__((__nonnull__));
 
@@ -368,7 +368,7 @@ void cx_linked_list_sort(
         ptrdiff_t loc_prev,
         ptrdiff_t loc_next,
         ptrdiff_t loc_data,
-        CxListComparator cmp_func
+        cx_compare_func cmp_func
 ) __attribute__((__nonnull__(1, 6)));
 
 
@@ -390,7 +390,7 @@ int cx_linked_list_compare(
         void const *begin_right,
         ptrdiff_t loc_advance,
         ptrdiff_t loc_data,
-        CxListComparator cmp_func
+        cx_compare_func cmp_func
 ) __attribute__((__nonnull__(5)));
 
 /**