[glib] Clean up locking in g_object_notify_queue_add
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Clean up locking in g_object_notify_queue_add
- Date: Mon, 7 Sep 2015 23:59:04 +0000 (UTC)
commit a62ad79f5c59152d1a52c3b52d969c3c48390cda
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 7 19:57:53 2015 -0400
Clean up locking in g_object_notify_queue_add
Instaed of returning with the lock held, simply assert
that this cannot happen:
https://bugzilla.gnome.org/show_bug.cgi?id=749678#c4
gobject/gobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 93f380c..89ad66f 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -304,7 +304,7 @@ g_object_notify_queue_add (GObject *object,
{
G_LOCK(notify_lock);
- g_return_if_fail (nqueue->n_pspecs < 65535);
+ g_assert (nqueue->n_pspecs < 65535);
if (g_slist_find (nqueue->pspecs, pspec) == NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]