Skip to content

Commit

Permalink
Fix deprecation warning with glib 2.81.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Aug 10, 2024
1 parent 28db863 commit 6c1e546
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions girara/datastructures.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ void girara_list_sort(girara_list_t* list, girara_compare_function_t compare) {
}

comparer_t comp = {compare};
#if GLIB_CHECK_VERSION(2, 81, 1)
g_sort_array(list->start, list->size, sizeof(void*), comparer, &comp);
#else
g_qsort_with_data(list->start, list->size, sizeof(void*), comparer, &comp);
#endif
}

void girara_list_foreach(girara_list_t* list, girara_list_callback_t callback, void* data) {
Expand Down

0 comments on commit 6c1e546

Please sign in to comment.