Function
GLibqsort_with_data
since: 2.0
Declaration
void
g_qsort_with_data (
gconstpointer pbase,
gint total_elems,
gsize size,
GCompareDataFunc compare_func,
gpointer user_data
)
Description
This is just like the standard C qsort() function, but
the comparison routine accepts a user data argument.
This is guaranteed to be a stable sort since version 2.32.
Available since: 2.0
Parameters
pbase-
Type:
gconstpointerStart of array to sort.
The data is owned by the caller of the function. total_elems-
Type:
gintElements in the array.
size-
Type:
gsizeSize of each element.
compare_func-
Type:
GCompareDataFuncFunction to compare elements.
user_data-
Type:
gpointerData to pass to
compare_func.The argument can be NULL.The data is owned by the caller of the function.