From ee13eb518d98e347e0c60681c372f93bf30db3c6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Oct 2019 11:40:00 +0100 Subject: [PATCH] array: Fix handling of user_data in doc-comment The user_data for g_ptr_array_sort_with_data is passed directly, not with an extra layer of pointer like the data pointers. Signed-off-by: Simon McVittie Fixes: 52c130f8 --- glib/garray.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glib/garray.c b/glib/garray.c index 05c68e1c2..af6487aa9 100644 --- a/glib/garray.c +++ b/glib/garray.c @@ -1955,11 +1955,11 @@ g_ptr_array_sort (GPtrArray *array, * sort_filelist (gconstpointer a, gconstpointer b, gpointer user_data) * { * gint order; - * const SortMode *sort_mode = GPOINTER_TO_INT (user_data); + * const SortMode sort_mode = GPOINTER_TO_INT (user_data); * const FileListEntry *entry1 = *((FileListEntry **) a); * const FileListEntry *entry2 = *((FileListEntry **) b); * - * switch (*sort_mode) + * switch (sort_mode) * { * case SORT_NAME: * order = g_ascii_strcasecmp (entry1->name, entry2->name);