Function
GLibsort_array
since: 2.82
Declaration [src]
void
g_sort_array (
void* array,
size_t n_elements,
size_t element_size,
GCompareDataFunc compare_func,
void* user_data
)
Description [src]
This is just like the standard C qsort() function, but
the comparison routine accepts a user data argument
(like qsort_r()).
Unlike qsort(), this is guaranteed to be a stable sort.
Available since: 2.82
This function is not directly available to language bindings.
Parameters
array-
Type: An array of
voidStart of array to sort.
The length of the array is specified in the n_elementsargument.The data is owned by the caller of the function. n_elements-
Type:
size_tNumber of elements in the array.
element_size-
Type:
size_tSize of each element.
compare_func-
Type:
GCompareDataFuncFunction to compare elements.
user_data-
Type:
void*Data to pass to
compare_func.The argument can be NULL.The data is owned by the caller of the function.