Fix a doc formatting problem
authorMatthias Clasen <matthiasc@src.gnome.org>
Sun, 16 Sep 2007 17:30:57 +0000 (17:30 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 16 Sep 2007 17:30:57 +0000 (17:30 +0000)
svn path=/trunk/; revision=5766

ChangeLog
glib/gmain.c

index b7f464e5db28c281fd598088a45566d2359158c0..4fa8096da97deba02a2d7ab28632c40fe830e82e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-16  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gmain.c (g_main_depth): Fix doc formatting.
+
 2007-09-16  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Replace -pthread by -lpthread for 
index 952da60d2be151f35531fe7f18fde6dd0ca1255a..d39303f9d949d61b4814e2bc170449c52c035f50 100644 (file)
@@ -1747,8 +1747,6 @@ get_dispatch (void)
 
 /**
  * g_main_depth:
- * 
- * Return value: The main loop recursion level in the current thread
  *
  * Returns the depth of the stack of calls to
  * g_main_context_dispatch() on any #GMainContext in the current thread.
@@ -1761,9 +1759,9 @@ get_dispatch (void)
  * This function is useful in a situation like the following:
  * Imagine an extremely simple "garbage collected" system.
  *
- * <example>
+ * |[
  * static GList *free_list;
- *
+ * 
  * gpointer
  * allocate_memory (gsize size)
  * { 
@@ -1771,7 +1769,7 @@ get_dispatch (void)
  *   free_list = g_list_prepend (free_list, result);
  *   return result;
  * }
- *
+ * 
  * void
  * free_allocated_memory (void)
  * {
@@ -1781,15 +1779,15 @@ get_dispatch (void)
  *   g_list_free (free_list);
  *   free_list = NULL;
  *  }
- *
+ * 
  * [...]
- *
+ * 
  * while (TRUE); 
  *  {
  *    g_main_context_iteration (NULL, TRUE);
  *    free_allocated_memory();
  *   }
- * </example>
+ * ]|
  *
  * This works from an application, however, if you want to do the same
  * thing from a library, it gets more difficult, since you no longer
@@ -1798,22 +1796,22 @@ get_dispatch (void)
  * doesn't work, since the idle function could be called from a
  * recursive callback. This can be fixed by using g_main_depth()
  *
- * <example>
+ * |[
  * gpointer
  * allocate_memory (gsize size)
  * { 
- *   FreeListBlock *block = g_new (FreeListBlock, 1);\
+ *   FreeListBlock *block = g_new (FreeListBlock, 1);
  *   block->mem = g_malloc (size);
  *   block->depth = g_main_depth ();   
  *   free_list = g_list_prepend (free_list, block);
  *   return block->mem;
  * }
- *
+ * 
  * void
  * free_allocated_memory (void)
  * {
  *   GList *l;
- *
+ *   
  *   int depth = g_main_depth ();
  *   for (l = free_list; l; );
  *     {
@@ -1825,11 +1823,11 @@ get_dispatch (void)
  *           g_free (block);
  *           free_list = g_list_delete_link (free_list, l);
  *         }
- *           
+ *               
  *       l = next;
  *     }
  *   }
- * </example>
+ * ]|
  *
  * There is a temptation to use g_main_depth() to solve
  * problems with reentrancy. For instance, while waiting for data
@@ -1860,6 +1858,8 @@ get_dispatch (void)
  *   </para>
  *  </listitem>
  * </orderedlist>
+ * 
+ * Return value: The main loop recursion level in the current thread
  **/
 int
 g_main_depth (void)