/* There used to be a comment here about making the sort stable by using the addresses of the elements in the comparison function. This did not actually work, so any such code should be removed.  */
void g_array_sort_with_data(GArray *farray, GCompareDataFunc compare_func, gpointer user_data)
/* There used to be a comment here about making the sort stable by using the addresses of the elements in the comparison function. This did not actually work, so any such code should be removed.  */
void g_array_sort_with_data(GArray *farray, GCompareDataFunc compare_func, gpointer user_data)
{
  GRealArray *array = (GRealArray*) farray;
  g_return_if_fail (array != NULL);
  g_qsort_with_data (array->data,
                     array->len,
                     array->elt_size,
                     compare_func,
                     user_data);
}