### Method

# GObject ValueArray sort

deprecated: 2.32

#### Declaration

    GValueArray*
    g_value_array_sort (
      GValueArray* value_array,
      GCompareFunc compare_func
    )

#### Description

Sort `value_array` using `compare_func` to compare the elements according to the semantics of `GCompareFunc`.

The current implementation uses the same sorting algorithm as standard C `qsort()` function.

Deprecated since: 2.32

Use `GArray` and g_array_sort().

The implementation of this method is provided by `g_value_array_sort_with_data()` in language bindings.

#### Parameters

`compare_func`

  Type: `GCompareFunc`

  Function to compare elements.

#### Return value

Type: `GValueArray`

The `GValueArray` passed in as `value_array`.

The returned data is owned by the instance.