[glib] Fix a typo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix a typo
- Date: Sun, 5 Jun 2011 23:07:37 +0000 (UTC)
commit d811f0cdc9fadc60628c85e4473c4458e755c8b3
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jun 5 19:07:06 2011 -0400
Fix a typo
And reword some docs.
gobject/gobject.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index a4b2e33..60d297d 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -50,14 +50,14 @@
* linkend="gobject-Signals"/>.
*
* <para id="floating-ref">
- * #GInitiallyUnowned is derived from #GObject. The only difference between
- * the two is that the initial reference of a #GInitiallyUnowned is flagged
+ * GInitiallyUnowned is derived from GObject. The only difference between
+ * the two is that the initial reference of a GInitiallyUnowned is flagged
* as a <firstterm>floating</firstterm> reference.
* This means that it is not specifically claimed to be "owned" by
* any code portion. The main motivation for providing floating references is
* C convenience. In particular, it allows code to be written as:
* |[
- * container = create_container();
+ * container = create_container ();
* container_add_child (container, create_child());
* ]|
* If <function>container_add_child()</function> will g_object_ref_sink() the
@@ -67,8 +67,8 @@
* reference leaks, it would have to be written as:
* |[
* Child *child;
- * container = create_container();
- * child = create_child();
+ * container = create_container ();
+ * child = create_child ();
* container_add_child (container, child);
* g_object_unref (child);
* ]|
@@ -79,24 +79,24 @@
* a new reference.
* Since floating references are useful almost exclusively for C convenience,
* language bindings that provide automated reference and memory ownership
- * maintenance (such as smart pointers or garbage collection) therefore don't
- * need to expose floating references in their API.
+ * maintenance (such as smart pointers or garbage collection) should not
+ * expose floating references in their API.
* </para>
*
* Some object implementations may need to save an objects floating state
- * across certain code portions (an example is #GtkMenu), to achive this, the
- * following sequence can be used:
+ * across certain code portions (an example is #GtkMenu), to achieve this,
+ * the following sequence can be used:
*
* |[
- * // save floating state
+ * /* save floating state */
* gboolean was_floating = g_object_is_floating (object);
* g_object_ref_sink (object);
- * // protected code portion
+ * /* protected code portion */
* ...;
- * // restore floating state
+ * /* restore floating state */
* if (was_floating)
* g_object_force_floating (object);
- * g_obejct_unref (object); // release previously acquired reference
+ * g_object_unref (object); /* release previously acquired reference */
* ]|
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]