Function

GLibSListsort

Declaration [src]

GSList*
g_slist_sort (
  GSList* list,
  GCompareFunc compare_func
)

Description [src]

Sorts a GSList using the given comparison function. The algorithm used is a stable sort.

This function is not directly available to language bindings.

Parameters

list

Type: A list of gpointer

A GSList.

The data is owned by the caller of the function.
compare_func

Type: GCompareFunc

The comparison function used to sort the GSList. This function is passed the data from 2 elements of the GSList and should return 0 if they are equal, a negative value if the first element comes before the second, or a positive value if the first element comes after the second.

Return value

Type: A list of gpointer

The start of the sorted GSList.

The data is owned by the called function.