mirror of
https://github.com/json-c/json-c.git
synced 2026-03-26 00:19:07 +08:00
arraylist: Fix names of parameters for callback function
This commit is contained in:
@@ -112,16 +112,16 @@ array_list_add(struct array_list *arr, void *data)
|
||||
}
|
||||
|
||||
void
|
||||
array_list_sort(struct array_list *arr, int(*sort_fn)(const void *, const void *))
|
||||
array_list_sort(struct array_list *arr, int(*compar)(const void *, const void *))
|
||||
{
|
||||
qsort(arr->array, arr->length, sizeof(arr->array[0]), sort_fn);
|
||||
qsort(arr->array, arr->length, sizeof(arr->array[0]), compar);
|
||||
}
|
||||
|
||||
void* array_list_bsearch(const void **key, struct array_list *arr,
|
||||
int (*sort_fn)(const void *, const void *))
|
||||
int (*compar)(const void *, const void *))
|
||||
{
|
||||
return bsearch(key, arr->array, arr->length, sizeof(arr->array[0]),
|
||||
sort_fn);
|
||||
compar);
|
||||
}
|
||||
|
||||
size_t
|
||||
|
||||
Reference in New Issue
Block a user