[glib] Revert "notify: Remove unused g_object_notify_queue_clear()"
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Revert "notify: Remove unused g_object_notify_queue_clear()"
- Date: Fri, 23 Jul 2010 08:53:24 +0000 (UTC)
commit 86040bb2eb11ad9501cc0c94754e8d8f29ba8f17
Author: Benjamin Otte <otte redhat com>
Date: Fri Jul 23 10:51:14 2010 +0200
Revert "notify: Remove unused g_object_notify_queue_clear()"
This reverts commit 0201a81f04ae5fd46c6db25859e90dde1fc35d4b and adds
locks in the right place.
As this file is a public header (see last commit), we cannot just remove
functions from it.
gobject/gobjectnotifyqueue.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gobject/gobjectnotifyqueue.c b/gobject/gobjectnotifyqueue.c
index e54e3f7..e53e22b 100644
--- a/gobject/gobjectnotifyqueue.c
+++ b/gobject/gobjectnotifyqueue.c
@@ -146,6 +146,21 @@ g_object_notify_queue_thaw (GObject *object,
}
static inline void
+g_object_notify_queue_clear (GObject *object,
+ GObjectNotifyQueue *nqueue)
+{
+ g_return_if_fail (nqueue->freeze_count > 0);
+
+ G_LOCK(notify_lock);
+
+ g_slist_free (nqueue->pspecs);
+ nqueue->pspecs = NULL;
+ nqueue->n_pspecs = 0;
+
+ G_UNLOCK(notify_lock);
+}
+
+static inline void
g_object_notify_queue_add (GObject *object,
GObjectNotifyQueue *nqueue,
GParamSpec *pspec)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]