### Function

# GLib PtrArray sort_values

since: 2.76

#### Declaration

    void
    g_ptr_array_sort_values (
      GPtrArray* array,
      GCompareFunc compare_func
    )

#### Description

Sorts the array, using `compare_func` which should be a qsort()-style comparison function (returns less than zero for first arg is less than second arg, zero for equal, greater than zero if first arg is greater than second arg).

This is guaranteed to be a stable sort.

Available since: 2.76

This function is not directly available to language bindings.

#### Parameters

`array`

  Type: An array of `gpointer`

  A `GPtrArray`.

  The data is owned by the caller of the function.

`compare_func`

  Type: `GCompareFunc`

  A `GCompareFunc` comparison function.