projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2819dd6
)
Revert "notify: Remove unused g_object_notify_queue_clear()"
author
Benjamin Otte
<otte@redhat.com>
Fri, 23 Jul 2010 08:51:14 +0000
(10:51 +0200)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 23 Jul 2010 08:52:51 +0000
(10:52 +0200)
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
patch
|
blob
|
history
diff --git
a/gobject/gobjectnotifyqueue.c
b/gobject/gobjectnotifyqueue.c
index
e54e3f7
..
e53e22b
100644
(file)
--- 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)