From eba8246ce534aa2965e455d972b43e3053c6a84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 29 Jun 2008 12:09:31 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20539626=20=E2=80=93=20Update=20docstrings?= =?UTF-8?q?=20for=20g=5Fobject=5Ffreeze=5Fnotify=20and?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2008-06-29 Björn Lindqvist Bug 539626 – Update docstrings for g_object_freeze_notify and g_object_thaw_notify * gobject/gobject.c: Explain how the freeze count works. svn path=/trunk/; revision=7102 --- ChangeLog | 7 +++++++ gobject/gobject.c | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d34561d1e..9af8de484 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-29 Björn Lindqvist + + Bug 539626 – Update docstrings for g_object_freeze_notify and + g_object_thaw_notify + + * gobject/gobject.c: Explain how the freeze count works. + 2008-06-26 Cody Russell * configure.in: Add #define GLIB_USING_SYSTEM_PRINTF diff --git a/gobject/gobject.c b/gobject/gobject.c index 86d7f7191..6a2a3704f 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -796,8 +796,10 @@ g_object_run_dispose (GObject *object) * g_object_freeze_notify: * @object: a #GObject * - * Stops emission of "notify" signals on @object. The signals are - * queued until g_object_thaw_notify() is called on @object. + * Increases the freeze count on @object. If the freeze count is + * non-zero, the emission of "notify" signals on @object is + * stopped. The signals are queued until the freeze count is decreased + * to zero. * * This is necessary for accessors that modify multiple properties to prevent * premature notification while the object is still being modified. @@ -863,8 +865,11 @@ g_object_notify (GObject *object, * g_object_thaw_notify: * @object: a #GObject * - * Reverts the effect of a previous call to g_object_freeze_notify(). - * This causes all queued "notify" signals on @object to be emitted. + * Reverts the effect of a previous call to + * g_object_freeze_notify(). The freeze count is decreased on @object + * and when it reaches zero, all queued "notify" signals are emitted. + * + * It is an error to call this function when the freeze count is zero. */ void g_object_thaw_notify (GObject *object)