Fix leftover references to g_main_context_depth() in docs.

Sun Feb 29 21:42:47 2004  Owen Taylor  <otaylor@redhat.com>

        * glib/gmain.c: Fix leftover references to
        g_main_context_depth() in docs.
This commit is contained in:
Owen Taylor 2004-03-01 02:45:15 +00:00 committed by Owen Taylor
parent 0875017ad1
commit e1c15eb0d1
7 changed files with 35 additions and 5 deletions

View File

@ -1,3 +1,8 @@
Sun Feb 29 21:42:47 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: Fix leftover references to
g_main_context_depth() in docs.
Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com> Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Add g_main_depth() (Request from * glib/gmain.[ch]: Add g_main_depth() (Request from

View File

@ -1,3 +1,8 @@
Sun Feb 29 21:42:47 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: Fix leftover references to
g_main_context_depth() in docs.
Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com> Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Add g_main_depth() (Request from * glib/gmain.[ch]: Add g_main_depth() (Request from

View File

@ -1,3 +1,8 @@
Sun Feb 29 21:42:47 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: Fix leftover references to
g_main_context_depth() in docs.
Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com> Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Add g_main_depth() (Request from * glib/gmain.[ch]: Add g_main_depth() (Request from

View File

@ -1,3 +1,8 @@
Sun Feb 29 21:42:47 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: Fix leftover references to
g_main_context_depth() in docs.
Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com> Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Add g_main_depth() (Request from * glib/gmain.[ch]: Add g_main_depth() (Request from

View File

@ -1,3 +1,8 @@
Sun Feb 29 21:42:47 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: Fix leftover references to
g_main_context_depth() in docs.
Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com> Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Add g_main_depth() (Request from * glib/gmain.[ch]: Add g_main_depth() (Request from

View File

@ -1,3 +1,8 @@
Sun Feb 29 21:42:47 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: Fix leftover references to
g_main_context_depth() in docs.
Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com> Sun Feb 29 21:34:34 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.[ch]: Add g_main_depth() (Request from * glib/gmain.[ch]: Add g_main_depth() (Request from

View File

@ -1785,7 +1785,7 @@ get_depth_pointer (void)
* control the main loop. You might think you can simply use an idle * control the main loop. You might think you can simply use an idle
* function to make the call to free_allocated_memory(), but that * function to make the call to free_allocated_memory(), but that
* doesn't work, since the idle function could be called from a * doesn't work, since the idle function could be called from a
* recursive callback. This can be fixed by using g_main_context_depth() * recursive callback. This can be fixed by using g_main_depth()
* *
* <example> * <example>
* gpointer * gpointer
@ -1793,7 +1793,7 @@ get_depth_pointer (void)
* { * {
* FreeListBlock *block = g_new (FreeListBlock, 1);\ * FreeListBlock *block = g_new (FreeListBlock, 1);\
* block->mem = g_malloc (size); * block->mem = g_malloc (size);
* block->depth = g_main_context_depth (NULL); * block->depth = g_main_depth ();
* free_list = g_list_prepend (free_list, block); * free_list = g_list_prepend (free_list, block);
* return block->mem; * return block->mem;
* } * }
@ -1803,7 +1803,7 @@ get_depth_pointer (void)
* { * {
* GList *l; * GList *l;
* *
* int depth = g_main_context_depth(); * int depth = g_main_depth ();
* for (l = free_list; l; ); * for (l = free_list; l; );
* { * {
* GList *next = l->next; * GList *next = l->next;
@ -1820,13 +1820,13 @@ get_depth_pointer (void)
* } * }
* </example> * </example>
* *
* There is a temptation to use g_main_context_depth() to solve * There is a temptation to use g_main_depth() to solve
* problems with reentrancy. For instance, while waiting for data * problems with reentrancy. For instance, while waiting for data
* to be received from the network in response to a menu item, * to be received from the network in response to a menu item,
* the menu item might be selected again. It might seem that * the menu item might be selected again. It might seem that
* one could write: * one could write:
* *
* if (g_main_context_depth(NULL) > 1) * if (g_main_depth () > 1)
* return; * return;
* *
* This should be avoided since the user then sees selecting the * This should be avoided since the user then sees selecting the