diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-16 07:40:44 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-06-03 22:04:31 -0400 |
commit | f065d7d60e2b6110705b1b32f050ccad0bcde62f (patch) | |
tree | 000a4e919f702e9a0043bfc31484ae738b821a33 /glib/gqueue.h | |
parent | 496157ffd3350799198e32e1002a19fc8be3ea83 (diff) | |
download | glib-f065d7d60e2b6110705b1b32f050ccad0bcde62f.tar.gz |
Have g_queue_remove() return a boolean
g_queue_remove() should return a boolean so callers can verify that an
element was found and removed, as in the following example:
if (g_queue_remove (queue, referenced_object))
g_object_unref (referenced_object);
Similarly, g_queue_remove_all() should return the number of elements
found and removed.
https://bugzilla.gnome.org/show_bug.cgi?id=632294
Diffstat (limited to 'glib/gqueue.h')
-rw-r--r-- | glib/gqueue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glib/gqueue.h b/glib/gqueue.h index e78488fb6..345d2c76d 100644 --- a/glib/gqueue.h +++ b/glib/gqueue.h @@ -85,9 +85,9 @@ gpointer g_queue_peek_nth (GQueue *queue, guint n); gint g_queue_index (GQueue *queue, gconstpointer data); -void g_queue_remove (GQueue *queue, +gboolean g_queue_remove (GQueue *queue, gconstpointer data); -void g_queue_remove_all (GQueue *queue, +guint g_queue_remove_all (GQueue *queue, gconstpointer data); void g_queue_insert_before (GQueue *queue, GList *sibling, |