Revert "notify: Remove unused g_object_notify_queue_clear()"

This reverts commit 0201a81f04 and adds
locks in the right place.

As this file is a public header (see last commit), we cannot just remove
functions from it.
This commit is contained in:
Benjamin Otte 2010-07-23 10:51:14 +02:00
parent 2819dd60b7
commit 86040bb2eb

View File

@ -145,6 +145,21 @@ g_object_notify_queue_thaw (GObject *object,
g_free (free_me);
}
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,