Remove references to nonexisting functions

* glib/gmain.c: Remove references to nonexisting functions
	g_source_set_callback_closure(), g_source_poll(), g_source_add()
	from docs.

	* glib/gdir.c (g_dir_open): Typo fix in docs.

	* glib/gasyncqueue.c (g_async_queue_lock):
	(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
	<link>s in docs.

	* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.

	* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.

	* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.

	* glib/tmpl/conversions.sgml: Add GIConv.

	* glib/tmpl/main.sgml: Fix references to nonexisting functions
	g_main_loop_destroy(), g_source_add(), g_source_connect().

	* glib/glib-sections.txt: Add GIConv, g_str_has_prefix, g_str_has_suffix.

	* glib/tmpl/linked_lists_single.sgml:
	* glib/tmpl/linked_lists_double.sgml: GListAllocator doesn't exist.

	* glib/glib-docs.sgml: Declare hash entity.

	* glib/tmpl/macros.sgml: Escape # in #ifdef to suppress erroneous links.

	* gobject/Makefile.am, gobject/gobject-docs.sgml, gobject/tmpl/*:
	* glib/Makefile.am, glib/glib-docs.sgml, glib/tmpl/*: Produce XML,
	not SGML.
This commit is contained in:
Matthias Clasen 2002-05-26 22:46:28 +00:00
parent 1ce72b0584
commit 5e45a337b8
38 changed files with 349 additions and 160 deletions

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,21 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/gmain.c: Remove references to nonexisting functions
g_source_set_callback_closure(), g_source_poll(), g_source_add()
from docs.
* glib/gdir.c (g_dir_open): Typo fix in docs.
* glib/gasyncqueue.c (g_async_queue_lock):
(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
<link>s in docs.
* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
2002-05-23 Havoc Pennington <hp@redhat.com> 2002-05-23 Havoc Pennington <hp@redhat.com>
* glib/gspawn.c (fork_exec_with_pipes): on success, close the * glib/gspawn.c (fork_exec_with_pipes): on success, close the

View File

@ -1,3 +1,26 @@
2002-05-26 Matthias Clasen <maclas@gmx.de>
* glib/tmpl/conversions.sgml: Add GIConv.
* glib/tmpl/main.sgml: Fix references to nonexisting functions
g_main_loop_destroy(), g_source_add(), g_source_connect().
* glib/glib-sections.txt: Add GIConv, g_str_has_prefix, g_str_has_suffix.
* glib/tmpl/linked_lists_single.sgml:
* glib/tmpl/linked_lists_double.sgml: GListAllocator doesn't exist.
* glib/glib-docs.sgml: Declare hash entity.
* glib/tmpl/macros.sgml: Escape # in #ifdef to suppress erroneous links.
2002-05-25 Matthias Clasen <maclas@gmx.de>
* gobject/Makefile.am, gobject/gobject-docs.sgml, gobject/tmpl/*:
* glib/Makefile.am, glib/glib-docs.sgml, glib/tmpl/*: Produce XML,
not SGML.
2002-05-21 Matthias Clasen <maclas@gmx.de> 2002-05-21 Matthias Clasen <maclas@gmx.de>
* glib/tmpl/markup.sgml: Updates. * glib/tmpl/markup.sgml: Updates.

View File

@ -13,7 +13,7 @@ DOC_SOURCE_DIR=../../..
SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED"
# Extra options to supply to gtkdoc-mkdb # Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra options to supply to gtkdoc-fixref # Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS= FIXXREF_OPTIONS=

View File

@ -1,62 +1,66 @@
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [ <?xml version="1.0"?>
<!entity glib-Basic-Types SYSTEM "sgml/types.sgml"> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
<!entity glib-Limits-of-Basic-Types SYSTEM "sgml/limits.sgml"> "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!entity glib-Standard-Macros SYSTEM "sgml/macros.sgml"> <!ENTITY nbsp "&#x00a0;">
<!entity glib-Type-Conversion-Macros SYSTEM "sgml/type_conversion.sgml"> <!ENTITY hash "#">
<!entity glib-Byte-Order-Macros SYSTEM "sgml/byte_order.sgml"> <!ENTITY glib-Basic-Types SYSTEM "xml/types.xml">
<!entity glib-Numerical-Definitions SYSTEM "sgml/numerical.sgml"> <!ENTITY glib-Limits-of-Basic-Types SYSTEM "xml/limits.xml">
<!entity glib-Miscellaneous-Macros SYSTEM "sgml/macros_misc.sgml"> <!ENTITY glib-Standard-Macros SYSTEM "xml/macros.xml">
<!entity glib-Memory-Allocation SYSTEM "sgml/memory.sgml"> <!ENTITY glib-Type-Conversion-Macros SYSTEM "xml/type_conversion.xml">
<!entity glib-Error-Reporting SYSTEM "sgml/error_reporting.sgml"> <!ENTITY glib-Byte-Order-Macros SYSTEM "xml/byte_order.xml">
<!entity glib-Warnings-and-Assertions SYSTEM "sgml/warnings.sgml"> <!ENTITY glib-Numerical-Definitions SYSTEM "xml/numerical.xml">
<!entity glib-Message-Logging SYSTEM "sgml/messages.sgml"> <!ENTITY glib-Miscellaneous-Macros SYSTEM "xml/macros_misc.xml">
<!entity glib-Pattern-Matching SYSTEM "sgml/patterns.sgml"> <!ENTITY glib-Memory-Allocation SYSTEM "xml/memory.xml">
<!entity glib-Timers SYSTEM "sgml/timers.sgml"> <!ENTITY glib-Error-Reporting SYSTEM "xml/error_reporting.xml">
<!entity glib-String-Utility-Functions SYSTEM "sgml/string_utils.sgml"> <!ENTITY glib-Warnings-and-Assertions SYSTEM "xml/warnings.xml">
<!entity glib-Character-Set-Conversion SYSTEM "sgml/conversions.sgml"> <!ENTITY glib-Message-Logging SYSTEM "xml/messages.xml">
<!entity glib-Unicode-Manipulation SYSTEM "sgml/unicode.sgml"> <!ENTITY glib-Pattern-Matching SYSTEM "xml/patterns.xml">
<!entity glib-Random-Numbers SYSTEM "sgml/random_numbers.sgml"> <!ENTITY glib-Timers SYSTEM "xml/timers.xml">
<!entity glib-Miscellaneous-Utility-Functions SYSTEM "sgml/misc_utils.sgml"> <!ENTITY glib-String-Utility-Functions SYSTEM "xml/string_utils.xml">
<!entity glib-Date-and-Time-Functions SYSTEM "sgml/date.sgml"> <!ENTITY glib-Character-Set-Conversion SYSTEM "xml/conversions.xml">
<!entity glib-The-Main-Event-Loop SYSTEM "sgml/main.sgml"> <!ENTITY glib-Unicode-Manipulation SYSTEM "xml/unicode.xml">
<!entity glib-Threads SYSTEM "sgml/threads.sgml"> <!ENTITY glib-Random-Numbers SYSTEM "xml/random_numbers.xml">
<!entity glib-Thread-Pools SYSTEM "sgml/thread_pools.sgml"> <!ENTITY glib-Miscellaneous-Utility-Functions SYSTEM "xml/misc_utils.xml">
<!entity glib-Async-Queues SYSTEM "sgml/async_queues.sgml"> <!ENTITY glib-Date-and-Time-Functions SYSTEM "xml/date.xml">
<!entity glib-IO-Channels SYSTEM "sgml/iochannels.sgml"> <!ENTITY glib-The-Main-Event-Loop SYSTEM "xml/main.xml">
<!entity glib-Hook-Functions SYSTEM "sgml/hooks.sgml"> <!ENTITY glib-Threads SYSTEM "xml/threads.xml">
<!entity glib-Lexical-Scanner SYSTEM "sgml/scanner.sgml"> <!ENTITY glib-Thread-Pools SYSTEM "xml/thread_pools.xml">
<!entity glib-Dynamic-Loading-of-Modules SYSTEM "sgml/modules.sgml"> <!ENTITY glib-Async-Queues SYSTEM "xml/async_queues.xml">
<!entity glib-Automatic-String-Completion SYSTEM "sgml/completion.sgml"> <!ENTITY glib-IO-Channels SYSTEM "xml/iochannels.xml">
<!entity glib-Windows-Compatability-Functions SYSTEM "sgml/windows.sgml"> <!ENTITY glib-Hook-Functions SYSTEM "xml/hooks.xml">
<!entity glib-Memory-Chunks SYSTEM "sgml/memory_chunks.sgml"> <!ENTITY glib-Lexical-Scanner SYSTEM "xml/scanner.xml">
<!entity glib-Doubly-Linked-Lists SYSTEM "sgml/linked_lists_double.sgml"> <!ENTITY glib-Dynamic-Loading-of-Modules SYSTEM "xml/modules.xml">
<!entity glib-Singly-Linked-Lists SYSTEM "sgml/linked_lists_single.sgml"> <!ENTITY glib-Automatic-String-Completion SYSTEM "xml/completion.xml">
<!entity glib-Double-ended-Queues SYSTEM "sgml/queue.sgml"> <!ENTITY glib-Windows-Compatability-Functions SYSTEM "xml/windows.xml">
<!entity glib-Trash-Stacks SYSTEM "sgml/trash_stack.sgml"> <!ENTITY glib-Memory-Chunks SYSTEM "xml/memory_chunks.xml">
<!entity glib-Hash-Tables SYSTEM "sgml/hash_tables.sgml"> <!ENTITY glib-Doubly-Linked-Lists SYSTEM "xml/linked_lists_double.xml">
<!entity glib-Strings SYSTEM "sgml/strings.sgml"> <!ENTITY glib-Singly-Linked-Lists SYSTEM "xml/linked_lists_single.xml">
<!entity glib-String-Chunks SYSTEM "sgml/string_chunks.sgml"> <!ENTITY glib-Double-ended-Queues SYSTEM "xml/queue.xml">
<!entity glib-Arrays SYSTEM "sgml/arrays.sgml"> <!ENTITY glib-Trash-Stacks SYSTEM "xml/trash_stack.xml">
<!entity glib-Pointer-Arrays SYSTEM "sgml/arrays_pointer.sgml"> <!ENTITY glib-Hash-Tables SYSTEM "xml/hash_tables.xml">
<!entity glib-Byte-Arrays SYSTEM "sgml/arrays_byte.sgml"> <!ENTITY glib-Strings SYSTEM "xml/strings.xml">
<!entity glib-Balanced-Binary-Trees SYSTEM "sgml/trees-binary.sgml"> <!ENTITY glib-String-Chunks SYSTEM "xml/string_chunks.xml">
<!entity glib-N-ary-Trees SYSTEM "sgml/trees-nary.sgml"> <!ENTITY glib-Arrays SYSTEM "xml/arrays.xml">
<!entity glib-Quarks SYSTEM "sgml/quarks.sgml"> <!ENTITY glib-Pointer-Arrays SYSTEM "xml/arrays_pointer.xml">
<!entity glib-Keyed-Data-Lists SYSTEM "sgml/datalist.sgml"> <!ENTITY glib-Byte-Arrays SYSTEM "xml/arrays_byte.xml">
<!entity glib-Datasets SYSTEM "sgml/datasets.sgml"> <!ENTITY glib-Balanced-Binary-Trees SYSTEM "xml/trees-binary.xml">
<!entity glib-Relations-and-Tuples SYSTEM "sgml/relations.sgml"> <!ENTITY glib-N-ary-Trees SYSTEM "xml/trees-nary.xml">
<!entity glib-Caches SYSTEM "sgml/caches.sgml"> <!ENTITY glib-Quarks SYSTEM "xml/quarks.xml">
<!entity glib-Memory-Allocators SYSTEM "sgml/allocators.sgml"> <!ENTITY glib-Keyed-Data-Lists SYSTEM "xml/datalist.xml">
<!entity glib-Spawn SYSTEM "sgml/spawn.sgml"> <!ENTITY glib-Datasets SYSTEM "xml/datasets.xml">
<!entity glib-Fileutils SYSTEM "sgml/fileutils.sgml"> <!ENTITY glib-Relations-and-Tuples SYSTEM "xml/relations.xml">
<!entity glib-Shell SYSTEM "sgml/shell.sgml"> <!ENTITY glib-Caches SYSTEM "xml/caches.xml">
<!entity glib-Markup SYSTEM "sgml/markup.sgml"> <!ENTITY glib-Memory-Allocators SYSTEM "xml/allocators.xml">
<!ENTITY glib-Spawn SYSTEM "xml/spawn.xml">
<!ENTITY glib-Fileutils SYSTEM "xml/fileutils.xml">
<!ENTITY glib-Shell SYSTEM "xml/shell.xml">
<!ENTITY glib-Markup SYSTEM "xml/markup.xml">
<!entity glib-Compiling SYSTEM "compiling.sgml"> <!ENTITY glib-Compiling SYSTEM "compiling.sgml">
<!entity glib-Building SYSTEM "building.sgml"> <!ENTITY glib-Building SYSTEM "building.sgml">
<!entity glib-Running SYSTEM "running.sgml"> <!ENTITY glib-Running SYSTEM "running.sgml">
<!entity glib-Resources SYSTEM "resources.sgml"> <!ENTITY glib-Resources SYSTEM "resources.sgml">
<!entity glib-Changes-2-0 SYSTEM "changes-2.0.sgml"> <!ENTITY glib-Changes-2-0 SYSTEM "changes-2.0.sgml">
]> ]>
<book id="index"> <book id="index">

View File

@ -881,6 +881,8 @@ g_stpcpy
g_strstr_len g_strstr_len
g_strrstr g_strrstr
g_strrstr_len g_strrstr_len
g_str_has_prefix
g_str_has_suffix
<SUBSECTION> <SUBSECTION>
g_strlcpy g_strlcpy
@ -1825,6 +1827,7 @@ g_random_double_range
<FILE>conversions</FILE> <FILE>conversions</FILE>
g_convert g_convert
g_convert_with_fallback g_convert_with_fallback
GIConv
g_convert_with_iconv g_convert_with_iconv
G_CONVERT_ERROR G_CONVERT_ERROR
g_iconv_open g_iconv_open

View File

@ -39,10 +39,10 @@ To free an array, use g_array_free().
/* We create a new array to store gint values. /* We create a new array to store gint values.
We don't want it zero-terminated or cleared to 0's. */ We don't want it zero-terminated or cleared to 0's. */
garray = g_array_new (FALSE, FALSE, sizeof (gint)); garray = g_array_new (FALSE, FALSE, sizeof (gint));
for (i = 0; i < 10000; i++) for (i = 0; i &lt; 10000; i++)
g_array_append_val (garray, i); g_array_append_val (garray, i);
for (i = 0; i < 10000; i++) for (i = 0; i &lt; 10000; i++)
if (g_array_index (garray, gint, i) != i) if (g_array_index (garray, gint, i) != i)
g_print ("ERROR: got %d instead of %d\n", g_print ("ERROR: got %d instead of %d\n",
g_array_index (garray, gint, i), i); g_array_index (garray, gint, i), i);

View File

@ -30,10 +30,10 @@ To free a #GByteArray, use g_byte_array_free().
gint i; gint i;
gbarray = g_byte_array_new (<!-- -->); gbarray = g_byte_array_new (<!-- -->);
for (i = 0; i < 10000; i++) for (i = 0; i &lt; 10000; i++)
g_byte_array_append (gbarray, (guint8*) "abcd", 4); g_byte_array_append (gbarray, (guint8*) "abcd", 4);
for (i = 0; i < 10000; i++) for (i = 0; i &lt; 10000; i++)
{ {
g_assert (gbarray->data[4*i] == 'a'); g_assert (gbarray->data[4*i] == 'a');
g_assert (gbarray->data[4*i+1] == 'b'); g_assert (gbarray->data[4*i+1] == 'b');

View File

@ -47,7 +47,7 @@ point to a location where an error can be placed. For example:
gchar *contents; gchar *contents;
GError *err = NULL; GError *err = NULL;
contents = g_file_get_contents ("foo.txt", &amp;err); contents = g_file_get_contents ("foo.txt", &amp;err);
g_assert ((contents == NULL && err != NULL) || (contents != NULL && err == NULL)); g_assert ((contents == NULL &amp;&amp; err != NULL) || (contents != NULL &amp;&amp; err == NULL));
if (err != NULL) if (err != NULL)
{ {
/* Report error to user, and free error */ /* Report error to user, and free error */
@ -110,7 +110,7 @@ foo_open_file (GError **error)
fd = open ("file.txt", O_RDONLY); fd = open ("file.txt", O_RDONLY);
if (fd < 0) if (fd &lt; 0)
{ {
g_set_error (error, g_set_error (error,
FOO_ERROR, /* error domain */ FOO_ERROR, /* error domain */

View File

@ -66,6 +66,14 @@ Specifies the type of function passed to g_set_error_handler().
@hook_list: @hook_list:
@hook: @hook:
<!-- ##### STRUCT GIConv ##### -->
<para>
The <structname>GIConv</structname> struct wraps an
<function>iconv()</function> conversion descriptor. It contains private data
and should only be accessed using the following functions.
</para>
<!-- ##### ENUM GIOFileMode ##### --> <!-- ##### ENUM GIOFileMode ##### -->
<para> <para>

View File

@ -218,7 +218,7 @@ g_hook_insert_sorted().
@new_hook: the #GHook being inserted. @new_hook: the #GHook being inserted.
@sibling: the #GHook to compare with @new_hook. @sibling: the #GHook to compare with @new_hook.
@Returns: a value <= 0 if @new_hook should be before @sibling. @Returns: a value &lt;= 0 if @new_hook should be before @sibling.
<!-- ##### FUNCTION g_hook_compare_ids ##### --> <!-- ##### FUNCTION g_hook_compare_ids ##### -->
@ -229,7 +229,7 @@ if the second id is greater than the first.
@new_hook: a #GHook. @new_hook: a #GHook.
@sibling: a #GHook to compare with @new_hook. @sibling: a #GHook to compare with @new_hook.
@Returns: a value <= 0 if the id of @sibling is >= the id of @new_hook. @Returns: a value &lt;= 0 if the id of @sibling is >= the id of @new_hook.
<!-- ##### FUNCTION g_hook_get ##### --> <!-- ##### FUNCTION g_hook_get ##### -->
@ -357,7 +357,7 @@ Returns the flags of a hook.
<para> <para>
The position of the first bit which is not reserved for internal The position of the first bit which is not reserved for internal
use be the #GHook implementation, i.e. use be the #GHook implementation, i.e.
<literal>1 << G_HOOK_FLAG_USER_SHIFT</literal> is the first bit <literal>1 &lt;&lt; G_HOOK_FLAG_USER_SHIFT</literal> is the first bit
which can be used for application-defined flags. which can be used for application-defined flags.
</para> </para>

View File

@ -25,7 +25,7 @@ of the
or simply pointers to any type of data. or simply pointers to any type of data.
</para> </para>
<para> <para>
List elements are allocated in blocks using a #GListAllocator, which is List elements are allocated in blocks using a #GAllocator, which is
more efficient than allocating elements individually. more efficient than allocating elements individually.
</para> </para>
<para> <para>
@ -216,7 +216,7 @@ the first node matching the given data.
<!-- ##### FUNCTION g_list_free ##### --> <!-- ##### FUNCTION g_list_free ##### -->
<para> <para>
Frees all of the memory used by a #GList. Frees all of the memory used by a #GList.
The freed elements are added to the #GListAllocator free list. The freed elements are added to the #GAllocator free list.
</para> </para>
<note> <note>
<para> <para>
@ -302,7 +302,7 @@ integer if the first value comes after the second.
@a: a value. @a: a value.
@b: a value to compare with. @b: a value to compare with.
@Returns: negative value if @a < @b; zero if @a = @b; positive value @Returns: negative value if @a &lt; @b; zero if @a = @b; positive value
if @a > @b. if @a > @b.
@ -328,7 +328,7 @@ integer if the first value comes after the second.
@a: a value. @a: a value.
@b: a value to compare with. @b: a value to compare with.
@user_data: user data to pass to comparison function. @user_data: user data to pass to comparison function.
@Returns: negative value if @a < @b; zero if @a = @b; positive value @Returns: negative value if @a &lt; @b; zero if @a = @b; positive value
if @a > @b. if @a > @b.

View File

@ -25,7 +25,7 @@ of the
or simply pointers to any type of data. or simply pointers to any type of data.
</para> </para>
<para> <para>
List elements are allocated in blocks using a #GListAllocator, which is List elements are allocated in blocks using a #GAllocator, which is
more efficient than allocating elements individually. more efficient than allocating elements individually.
</para> </para>
<para> <para>
@ -224,7 +224,7 @@ the first node matching the given data.
<!-- ##### FUNCTION g_slist_free ##### --> <!-- ##### FUNCTION g_slist_free ##### -->
<para> <para>
Frees all of the memory used by a #GSList. Frees all of the memory used by a #GSList.
The freed elements are added to the #GListAllocator free list. The freed elements are added to the #GAllocator free list.
</para> </para>
@list: a #GSList. @list: a #GSList.

View File

@ -38,7 +38,7 @@ The micro version number of the GLib library.
<!-- ##### MACRO G_OS_WIN32 ##### --> <!-- ##### MACRO G_OS_WIN32 ##### -->
<para> <para>
This macro is defined only on Windows. So you can bracket This macro is defined only on Windows. So you can bracket
Windows-specific code in "#ifdef G_OS_WIN32". Windows-specific code in "&hash;ifdef G_OS_WIN32".
</para> </para>
@ -46,7 +46,7 @@ Windows-specific code in "#ifdef G_OS_WIN32".
<!-- ##### MACRO G_OS_BEOS ##### --> <!-- ##### MACRO G_OS_BEOS ##### -->
<para> <para>
This macro is defined only on BeOS. So you can bracket This macro is defined only on BeOS. So you can bracket
BeOS-specific code in "#ifdef G_OS_BEOS". BeOS-specific code in "&hash;ifdef G_OS_BEOS".
</para> </para>
@ -54,7 +54,7 @@ BeOS-specific code in "#ifdef G_OS_BEOS".
<!-- ##### MACRO G_OS_UNIX ##### --> <!-- ##### MACRO G_OS_UNIX ##### -->
<para> <para>
This macro is defined only on UNIX. So you can bracket This macro is defined only on UNIX. So you can bracket
UNIX-specific code in "#ifdef G_OS_UNIX". UNIX-specific code in "&hash;ifdef G_OS_UNIX".
</para> </para>

View File

@ -10,7 +10,7 @@ manages all available sources of events.
GLib and GTK+ applications. These events can come from any number of GLib and GTK+ applications. These events can come from any number of
different types of sources such as file descriptors (plain files, different types of sources such as file descriptors (plain files,
pipes or sockets) and timeouts. New types of event sources can also pipes or sockets) and timeouts. New types of event sources can also
be added using g_source_add(). be added using g_source_attach().
</para> </para>
<para> <para>
To allow multiple independent sets of sources to be handled in To allow multiple independent sets of sources to be handled in
@ -89,11 +89,11 @@ manages all available sources of events.
</para> </para>
<para> <para>
The operation of these functions can best be seen in terms The operation of these functions can best be seen in terms
of a state diagram, as shown in <xref linkend="mainloop-states">. of a state diagram, as shown in <xref linkend="mainloop-states"/>.
</para> </para>
<figure id="mainloop-states"> <figure id="mainloop-states">
<title>States of a Main Context</title> <title>States of a Main Context</title>
<graphic fileref="mainloop-states.gif" format="gif"></graphic> <graphic fileref="mainloop-states.gif" format="GIF"></graphic>
</figure> </figure>
</refsect2> </refsect2>
@ -184,7 +184,7 @@ very important since calling g_main_run() will set this to %TRUE anyway.
<!-- ##### MACRO g_main_destroy ##### --> <!-- ##### MACRO g_main_destroy ##### -->
<para> <para>
Frees the memory allocated for the #GMainLoop. A compatibility macro, see Frees the memory allocated for the #GMainLoop. A compatibility macro, see
g_main_loop_destroy(). g_main_loop_unref().
</para> </para>
@loop: a #GMainLoop. @loop: a #GMainLoop.
@ -587,8 +587,8 @@ g_main_context_set_poll_func() for full details.
<!-- ##### STRUCT GPollFD ##### --> <!-- ##### STRUCT GPollFD ##### -->
<para> <para>
<informaltable pgwide=1 frame="none" role="struct"> <informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"> <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody> <tbody>
<row> <row>
@ -631,8 +631,8 @@ an event source.
The #GSourceFuncs struct contains a table of functions used to handle The #GSourceFuncs struct contains a table of functions used to handle
event sources in a generic manner. event sources in a generic manner.
<informaltable pgwide=1 frame="none" role="struct"> <informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"> <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody> <tbody>
<row> <row>
@ -664,7 +664,7 @@ called, so the source should be checked again here.
Called to dispatch the event source, after it has returned %TRUE in Called to dispatch the event source, after it has returned %TRUE in
either its @prepare or its @check function. The @dispatch function is either its @prepare or its @check function. The @dispatch function is
passed in a callback function and data. The callback function may be passed in a callback function and data. The callback function may be
%NULL if the source was never connected using g_source_connect(). The %NULL if the source was never connected using g_source_attach(). The
@dispatch function should call the callback function with data and @dispatch function should call the callback function with data and
whatever additional parameters are needed for this type of event source. whatever additional parameters are needed for this type of event source.
</entry> </entry>

View File

@ -127,7 +127,7 @@ Allocates @size bytes on the stack; these bytes will be freed when the current
stack frame is cleaned up. This macro essentially just wraps the stack frame is cleaned up. This macro essentially just wraps the
<function>alloca()</function> function present on most UNIX variants. <function>alloca()</function> function present on most UNIX variants.
Thus it provides the same advantages and pitfalls as <function>alloca()</function>: Thus it provides the same advantages and pitfalls as <function>alloca()</function>:
<msgtext><variablelist> <variablelist>
<varlistentry><term></term><listitem><para> <varlistentry><term></term><listitem><para>
+ <function>alloca()</function> is very fast, as on most systems it's implemented by just adjusting + <function>alloca()</function> is very fast, as on most systems it's implemented by just adjusting
the stack pointer register. the stack pointer register.
@ -153,7 +153,7 @@ Thus it provides the same advantages and pitfalls as <function>alloca()</functio
will be freed together with the variable sized array upon exit of that scope, and will be freed together with the variable sized array upon exit of that scope, and
not upon exit of the enclosing function scope. not upon exit of the enclosing function scope.
</para></listitem></varlistentry> </para></listitem></varlistentry>
</variablelist></msgtext> </variablelist>
</para> </para>

View File

@ -68,18 +68,18 @@ To help debug memory chunks, use g_mem_chunk_info() and g_mem_chunk_print().
mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE); mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE);
/* Now allocate 10000 atoms. */ /* Now allocate 10000 atoms. */
for (i = 0; i < 10000; i++) for (i = 0; i &lt; 10000; i++)
{ {
mem[i] = g_chunk_new (gchar, mem_chunk); mem[i] = g_chunk_new (gchar, mem_chunk);
/* Fill in the atom memory with some junk. */ /* Fill in the atom memory with some junk. */
for (j = 0; j < 50; j++) for (j = 0; j &lt; 50; j++)
mem[i][j] = i * j; mem[i][j] = i * j;
} }
/* Now free all of the atoms. Note that since we are going to destroy the /* Now free all of the atoms. Note that since we are going to destroy the
GMemChunk, this wouldn't normally be used. */ GMemChunk, this wouldn't normally be used. */
for (i = 0; i < 10000; i++) for (i = 0; i &lt; 10000; i++)
{ {
g_mem_chunk_free (mem_chunk, mem[i]); g_mem_chunk_free (mem_chunk, mem[i]);
} }

View File

@ -104,6 +104,26 @@ The returned string should be freed when no longer needed.
@Returns: @Returns:
<!-- ##### FUNCTION g_str_has_prefix ##### -->
<para>
</para>
@str:
@prefix:
@Returns:
<!-- ##### FUNCTION g_str_has_suffix ##### -->
<para>
</para>
@str:
@suffix:
@Returns:
<!-- ##### FUNCTION g_strlcpy ##### --> <!-- ##### FUNCTION g_strlcpy ##### -->
<para> <para>
Portability wrapper that calls strlcpy() on systems which have it, and emulates Portability wrapper that calls strlcpy() on systems which have it, and emulates
@ -562,8 +582,8 @@ how to replace it.
@s1: a string. @s1: a string.
@s2: a string to compare with @s1. @s2: a string to compare with @s1.
@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive @Returns: 0 if the strings match, a negative value if @s1 &lt; @s2, or a positive
value if @s1 > @s2. value if @s1 &gt; @s2.
<!-- ##### FUNCTION g_strncasecmp ##### --> <!-- ##### FUNCTION g_strncasecmp ##### -->
@ -595,8 +615,8 @@ UTF-8.
@s1: a string. @s1: a string.
@s2: a string to compare with @s1. @s2: a string to compare with @s1.
@n: the maximum number of characters to compare. @n: the maximum number of characters to compare.
@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive @Returns: 0 if the strings match, a negative value if @s1 &lt; @s2, or a positive
value if @s1 > @s2. value if @s1 &gt; @s2.
<!-- ##### FUNCTION g_strreverse ##### --> <!-- ##### FUNCTION g_strreverse ##### -->

View File

@ -73,8 +73,10 @@ you do not have to worry about having enough space to copy the string.
</para> </para>
@string: the destination #GString. Its current contents are destroyed. @string: the destination #GString. Its current contents are destroyed.
@val: the string to copy into @string. @rval:
@Returns: the destination #GString. @Returns: the destination #GString.
<!-- # Unused Parameters # -->
@val: the string to copy into @string.
<!-- ##### MACRO g_string_sprintf ##### --> <!-- ##### MACRO g_string_sprintf ##### -->

View File

@ -1022,7 +1022,7 @@ example:
g_static_rw_lock_reader_lock (&amp;rwlock); g_static_rw_lock_reader_lock (&amp;rwlock);
if (index < array->len) if (index &lt; array->len)
retval = g_ptr_array_index (array, index); retval = g_ptr_array_index (array, index);
g_static_rw_lock_reader_unlock (&amp;rwlock); g_static_rw_lock_reader_unlock (&amp;rwlock);

View File

@ -13,7 +13,7 @@ DOC_SOURCE_DIR=../../../gobject
SCAN_OPTIONS= SCAN_OPTIONS=
# Extra options to supply to gtkdoc-mkdb # Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS= MKDB_OPTIONS=--output-format=xml
# Extra options to supply to gtkdoc-fixref # Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html

View File

@ -1,17 +1,20 @@
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [ <?xml version="1.0"?>
<!entity gobject-GType SYSTEM "sgml/gtype.sgml"> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
<!entity gobject-GTypePlugin SYSTEM "sgml/gtypeplugin.sgml"> "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!entity gobject-GTypeModule SYSTEM "sgml/gtypemodule.sgml"> <!ENTITY nbsp "&#x00a0;">
<!entity gobject-The-Base-Object-Type SYSTEM "sgml/objects.sgml"> <!ENTITY gobject-GType SYSTEM "xml/gtype.xml">
<!entity gobject-Enumeration-and-Flag-Types SYSTEM "sgml/enumerations_flags.sgml"> <!ENTITY gobject-GTypePlugin SYSTEM "xml/gtypeplugin.xml">
<!entity gobject-Boxed-Types SYSTEM "sgml/gboxed.sgml"> <!ENTITY gobject-GTypeModule SYSTEM "xml/gtypemodule.xml">
<!entity gobject-Generic-values SYSTEM "sgml/generic_values.sgml"> <!ENTITY gobject-The-Base-Object-Type SYSTEM "xml/objects.xml">
<!entity gobject-param-value-types SYSTEM "sgml/param_value_types.sgml"> <!ENTITY gobject-Enumeration-and-Flag-Types SYSTEM "xml/enumerations_flags.xml">
<!entity gobject-GParamSpec SYSTEM "sgml/gparamspec.sgml"> <!ENTITY gobject-Boxed-Types SYSTEM "xml/gboxed.xml">
<!entity gobject-Varargs-Value-Collection SYSTEM "sgml/value_collection.sgml"> <!ENTITY gobject-Generic-values SYSTEM "xml/generic_values.xml">
<!entity gobject-Signals SYSTEM "sgml/signals.sgml"> <!ENTITY gobject-param-value-types SYSTEM "xml/param_value_types.xml">
<!entity gobject-Closures SYSTEM "sgml/gclosure.sgml"> <!ENTITY gobject-GParamSpec SYSTEM "xml/gparamspec.xml">
<!entity gobject-Value-Arrays SYSTEM "sgml/value_arrays.sgml"> <!ENTITY gobject-Varargs-Value-Collection SYSTEM "xml/value_collection.xml">
<!ENTITY gobject-Signals SYSTEM "xml/signals.xml">
<!ENTITY gobject-Closures SYSTEM "xml/gclosure.xml">
<!ENTITY gobject-Value-Arrays SYSTEM "xml/value_arrays.xml">
]> ]>
<book id="index"> <book id="index">
<bookinfo> <bookinfo>

View File

@ -175,7 +175,7 @@ When closures are newly created, they get an initial reference count
of 1, eventhough no caller has yet invoked g_closure_ref() on the @closure. of 1, eventhough no caller has yet invoked g_closure_ref() on the @closure.
Code entities that store closures for notification purposes are supposed Code entities that store closures for notification purposes are supposed
to call this function, for example like this: to call this function, for example like this:
<msgtext><programlisting> <informalexample><programlisting>
static GClosure *notify_closure = NULL; static GClosure *notify_closure = NULL;
void void
foo_notify_set_closure (GClosure *closure) foo_notify_set_closure (GClosure *closure)
@ -189,7 +189,7 @@ foo_notify_set_closure (GClosure *closure)
g_closure_sink (notify_closure); g_closure_sink (notify_closure);
} }
} }
</programlisting></msgtext> </programlisting></informalexample>
Because g_closure_sink() may decrement the reference count of a closure Because g_closure_sink() may decrement the reference count of a closure
(if it hasn't been called on @closure yet) just like g_closure_unref(), (if it hasn't been called on @closure yet) just like g_closure_unref(),
g_closure_ref() should be called prior to this function. g_closure_ref() should be called prior to this function.

View File

@ -235,22 +235,22 @@ to serve as a container for values of a type.
old contents. E.g. for the implementation of a string old contents. E.g. for the implementation of a string
value that may never be %NULL, the implementation might value that may never be %NULL, the implementation might
look like: look like:
<msgtext><programlisting> <programlisting>
{ {
value-&gt;data[0].v_pointer = g_strdup (""); value-&gt;data[0].v_pointer = g_strdup ("");
} }
</programlisting></msgtext> </programlisting>
@value_free: Free any old contents that might be left in the @value_free: Free any old contents that might be left in the
data array of the passed in @value. No resources may data array of the passed in @value. No resources may
remain allocated through the #GValue contents after remain allocated through the #GValue contents after
this function returns. E.g. for our above string type: this function returns. E.g. for our above string type:
<msgtext><programlisting> <programlisting>
{ {
/* only free strings without a specific flag for static storage */ /* only free strings without a specific flag for static storage */
if (!(value-&gt;data[1].v_uint & G_VALUE_NOCOPY_CONTENTS)) if (!(value-&gt;data[1].v_uint &amp; G_VALUE_NOCOPY_CONTENTS))
g_free (value-&gt;data[0].v_pointer); g_free (value-&gt;data[0].v_pointer);
} }
</programlisting></msgtext> </programlisting>
@value_copy: @dest_value is a #GValue with zero-filled data section @value_copy: @dest_value is a #GValue with zero-filled data section
and @src_value is a properly setup #GValue of same or and @src_value is a properly setup #GValue of same or
derived type. derived type.
@ -258,24 +258,24 @@ to serve as a container for values of a type.
@src_value into @dest_value in a way, that even after @src_value into @dest_value in a way, that even after
@src_value has been freed, the contents of @dest_value @src_value has been freed, the contents of @dest_value
remain valid. String type example: remain valid. String type example:
<msgtext><programlisting> <programlisting>
{ {
dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer); dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer);
} }
</programlisting></msgtext> </programlisting>
@value_peek_pointer: If the value contents fit into a pointer, such as objects @value_peek_pointer: If the value contents fit into a pointer, such as objects
or strings, return this pointer, so the caller can peek at or strings, return this pointer, so the caller can peek at
the current contents. To extend on our above string example: the current contents. To extend on our above string example:
<msgtext><programlisting> <programlisting>
{ {
return value-&gt;data[0].v_pointer; return value-&gt;data[0].v_pointer;
} }
</programlisting></msgtext> </programlisting>
@collect_format: A string format describing how to collect the contents of @collect_format: A string format describing how to collect the contents of
this value, bit-by-bit. Each character in the format represents this value, bit-by-bit. Each character in the format represents
an argument to be collected, the characters themselves indicate an argument to be collected, the characters themselves indicate
the type of the argument. Currently supported arguments are: the type of the argument. Currently supported arguments are:
<msgtext><variablelist> <variablelist>
<varlistentry><term></term><listitem><para> <varlistentry><term></term><listitem><para>
'i' - Integers. passed as collect_values[].v_int. 'i' - Integers. passed as collect_values[].v_int.
</para></listitem></varlistentry> </para></listitem></varlistentry>
@ -288,7 +288,7 @@ to serve as a container for values of a type.
<varlistentry><term></term><listitem><para> <varlistentry><term></term><listitem><para>
'p' - Pointers. passed as collect_values[].v_pointer. 'p' - Pointers. passed as collect_values[].v_pointer.
</para></listitem></varlistentry> </para></listitem></varlistentry>
</variablelist></msgtext> </variablelist>
It should be noted, that for variable argument list construction, It should be noted, that for variable argument list construction,
ANSI C promotes every type smaller than an integer to an int, and ANSI C promotes every type smaller than an integer to an int, and
floats to doubles. So for collection of short int or char, 'i' floats to doubles. So for collection of short int or char, 'i'
@ -313,11 +313,11 @@ to serve as a container for values of a type.
Thus an extra copy of the contents stored in @collect_values is Thus an extra copy of the contents stored in @collect_values is
not required for assignment to @value. not required for assignment to @value.
For our above string example, we continue with: For our above string example, we continue with:
<msgtext><programlisting> <programlisting>
{ {
if (!collect_values[0].v_pointer) if (!collect_values[0].v_pointer)
value->data[0].v_pointer = g_strdup (""); value->data[0].v_pointer = g_strdup ("");
else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
{ {
value-&gt;data[0].v_pointer = collect_values[0].v_pointer; value-&gt;data[0].v_pointer = collect_values[0].v_pointer;
/* keep a flag for the value_free() implementation to not free this string */ /* keep a flag for the value_free() implementation to not free this string */
@ -328,7 +328,7 @@ to serve as a container for values of a type.
return NULL; return NULL;
} }
</programlisting></msgtext> </programlisting>
It should be noted, that it is generally a bad idea to follow the It should be noted, that it is generally a bad idea to follow the
#G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to #G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to
reentrancy requirements and reference count assertions performed reentrancy requirements and reference count assertions performed
@ -336,7 +336,7 @@ to serve as a container for values of a type.
for reference counted contents stored in the value-&gt;data array. for reference counted contents stored in the value-&gt;data array.
To deviate from our string example for a moment, and taking a look To deviate from our string example for a moment, and taking a look
at an exemplary implementation for collect_value() of #GObject: at an exemplary implementation for collect_value() of #GObject:
<msgtext><programlisting> <programlisting>
{ {
if (collect_values[0].v_pointer) if (collect_values[0].v_pointer)
{ {
@ -349,7 +349,7 @@ to serve as a container for values of a type.
else else
return g_strdup_printf ("Object passed as invalid NULL pointer"); return g_strdup_printf ("Object passed as invalid NULL pointer");
} }
</programlisting></msgtext> </programlisting>
The reference count for valid objects is always incremented, The reference count for valid objects is always incremented,
regardless of @collect_flags. For invalid objects, the example regardless of @collect_flags. For invalid objects, the example
returns a newly allocated string without altering @value. returns a newly allocated string without altering @value.
@ -378,23 +378,23 @@ to serve as a container for values of a type.
Similar to collect_value() the function may prematurely abort Similar to collect_value() the function may prematurely abort
by returning a newly allocated string describing an error condition. by returning a newly allocated string describing an error condition.
To complete the string example: To complete the string example:
<msgtext><programlisting> <programlisting>
{ {
gchar **string_p = collect_values[0].v_pointer; gchar **string_p = collect_values[0].v_pointer;
if (!string_p) if (!string_p)
return g_strdup_printf ("string location passed as NULL"); return g_strdup_printf ("string location passed as NULL");
if (collect_flags & G_VALUE_NOCOPY_CONTENTS) if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS)
*string_p = value-&gt;data[0].v_pointer; *string_p = value-&gt;data[0].v_pointer;
else else
*string_p = g_strdup (value-&gt;data[0].v_pointer); *string_p = g_strdup (value-&gt;data[0].v_pointer);
} }
</programlisting></msgtext> </programlisting>
And an exemplary version of lcopy_value() for And an exemplary version of lcopy_value() for
reference-counted types: reference-counted types:
<msgtext><programlisting> <programlisting>
{ {
GObject **object_p = collect_values[0].v_pointer; GObject **object_p = collect_values[0].v_pointer;
@ -402,13 +402,13 @@ to serve as a container for values of a type.
return g_strdup_printf ("object location passed as NULL"); return g_strdup_printf ("object location passed as NULL");
if (!value-&gt;data[0].v_pointer) if (!value-&gt;data[0].v_pointer)
*object_p = NULL; *object_p = NULL;
else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /* always honour */ else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS) /* always honour */
*object_p = value-&gt;data[0].v_pointer; *object_p = value-&gt;data[0].v_pointer;
else else
*object_p = g_object_ref (value-&gt;data[0].v_pointer); *object_p = g_object_ref (value-&gt;data[0].v_pointer);
return NULL; return NULL;
} }
</programlisting></msgtext> </programlisting>
<!-- ##### MACRO G_TYPE_FROM_INSTANCE ##### --> <!-- ##### MACRO G_TYPE_FROM_INSTANCE ##### -->
<para> <para>
@ -676,9 +676,9 @@ a reference count on their parent classes as long as they are instantiated,
the returned class will always exist. This function is essentially the returned class will always exist. This function is essentially
equivalent to: equivalent to:
<msgtext><programlisting> <programlisting>
g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class))); g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)));
</programlisting></msgtext> </programlisting>
</para> </para>
@ -832,7 +832,7 @@ is performed for class initialization of derived types as well.
An example may help to correspond the intend of the different class An example may help to correspond the intend of the different class
initializers: initializers:
<msgtext><programlisting> <programlisting>
typedef struct { typedef struct {
GObjectClass parent_class; GObjectClass parent_class;
gint static_integer; gint static_integer;
@ -874,7 +874,7 @@ type_b_class_init (TypeBClass *class)
{ {
class->static_float = 3.14159265358979323846; class->static_float = 3.14159265358979323846;
} }
</programlisting></msgtext> </programlisting>
Initialization of TypeBClass will first cause initialization of Initialization of TypeBClass will first cause initialization of
TypeAClass (derived classes reference their parent classes, see TypeAClass (derived classes reference their parent classes, see
g_type_class_ref() on this). g_type_class_ref() on this).

View File

@ -440,7 +440,7 @@ without invoking it's destroy() function (if any was
set). set).
Usually, calling this function is only required to update Usually, calling this function is only required to update
user data pointers with a destroy notifier, for example: user data pointers with a destroy notifier, for example:
<msgtext><programlisting> <programlisting>
void void
object_add_to_user_list (GObject *object, object_add_to_user_list (GObject *object,
const gchar *new_string) const gchar *new_string)
@ -464,7 +464,7 @@ free_string_list (gpointer data)
g_free (node->data); g_free (node->data);
g_list_free (list); g_list_free (list);
} }
</programlisting></msgtext> </programlisting>
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata()
would have left the destroy function set, and thus the partial string list would would have left the destroy function set, and thus the partial string list would
have been freed upon g_object_set_qdata_full(). have been freed upon g_object_set_qdata_full().

View File

@ -180,11 +180,11 @@ filled in by the g_signal_query() function.
@n_params: The number of parameters that user callbacks take. @n_params: The number of parameters that user callbacks take.
@param_types: The individual parameter types for user callbacks, note that the @param_types: The individual parameter types for user callbacks, note that the
effective callback signature is: effective callback signature is:
<msgtext><programlisting> <programlisting>
@return_type callback (#gpointer data1, @return_type callback (#gpointer data1,
[#param_types param_names,] [#param_types param_names,]
#gpointer data2); #gpointer data2);
</programlisting></msgtext> </programlisting>
<!-- ##### MACRO G_SIGNAL_TYPE_STATIC_SCOPE ##### --> <!-- ##### MACRO G_SIGNAL_TYPE_STATIC_SCOPE ##### -->
<para> <para>

View File

@ -88,7 +88,7 @@ Insert a copy of @value at specified position into @value_array.
</para> </para>
@value_array: #GValueArray to add an element to @value_array: #GValueArray to add an element to
@index: insertion position, must be <= value_array->n_values @index: insertion position, must be &lt;= value_array-&gt;n_values
@value: #GValue to copy into #GValueArray @value: #GValue to copy into #GValueArray
@Returns: the #GValueArray passed in as @value_array @Returns: the #GValueArray passed in as @value_array
@ -99,7 +99,7 @@ Remove the value at position @index from @value_array.
</para> </para>
@value_array: #GValueArray to remove an element from @value_array: #GValueArray to remove an element from
@index: position of value to remove, must be < value_array->n_values @index: position of value to remove, must be &lt; value_array->n_values
@Returns: the #GValueArray passed in as @value_array @Returns: the #GValueArray passed in as @value_array

View File

@ -97,7 +97,7 @@ g_async_queue_ref_unlocked (GAsyncQueue *queue)
* destroyed and the memory allocated will be freed. So you are not * destroyed and the memory allocated will be freed. So you are not
* allowed to use the @queue afterwards, as it might have disappeared. * allowed to use the @queue afterwards, as it might have disappeared.
* The obvious asymmetry (it is not named * The obvious asymmetry (it is not named
* g_async_queue_unref_unlocked()) is because the queue can't be * g_async_queue_unref_unlocked(<!-- -->)) is because the queue can't be
* unlocked after unreffing it, as it might already have disappeared. * unlocked after unreffing it, as it might already have disappeared.
**/ **/
void void
@ -146,7 +146,7 @@ g_async_queue_unref (GAsyncQueue *queue)
* @queue: a #GAsyncQueue. * @queue: a #GAsyncQueue.
* *
* Acquires the @queue's lock. After that you can only call the * Acquires the @queue's lock. After that you can only call the
* <function>g_async_queue_*_unlocked()</function> function variants on that * <function>g_async_queue_*_unlocked(<!-- -->)</function> function variants on that
* @queue. Otherwise it will deadlock. * @queue. Otherwise it will deadlock.
**/ **/
void void

View File

@ -51,7 +51,7 @@ struct _GDir
* *
* Opens a directory for reading. The names of the files * Opens a directory for reading. The names of the files
* in the directory can then be retrieved using * in the directory can then be retrieved using
* g_dir_get_name(). * g_dir_read_name().
* *
* Return value: a newly allocated #GDir on success, %NULL on failure. * Return value: a newly allocated #GDir on success, %NULL on failure.
* If non-%NULL, you must free the result with g_dir_close() * If non-%NULL, you must free the result with g_dir_close()

View File

@ -695,7 +695,7 @@ g_main_context_default (void)
* <literal>sizeof (GSource)</literal>. * <literal>sizeof (GSource)</literal>.
* *
* The source will not initially be associated with any #GMainContext * The source will not initially be associated with any #GMainContext
* and must be added to one with g_source_add() before it will be * and must be added to one with g_source_attach() before it will be
* executed. * executed.
* *
* Return value: the newly-created #GSource. * Return value: the newly-created #GSource.
@ -965,7 +965,7 @@ g_source_add_poll (GSource *source,
/** /**
* g_source_remove_poll: * g_source_remove_poll:
* @source:a #GSource * @source:a #GSource
* @fd: a #GPollFD structure previously passed to g_source_poll(). * @fd: a #GPollFD structure previously passed to g_source_add_poll().
* *
* Removes a file descriptor from the set of file descriptors polled for * Removes a file descriptor from the set of file descriptors polled for
* this source. * this source.
@ -1002,8 +1002,8 @@ g_source_remove_poll (GSource *source,
* and getting the callback and data * and getting the callback and data
* *
* Sets the callback function storing the data as a refcounted callback * Sets the callback function storing the data as a refcounted callback
* "object". This is used to implement g_source_set_callback_closure() * "object". This is used internally. Note that calling
* and internally. Note that calling g_source_set_callback_indirect() assumes * g_source_set_callback_indirect() assumes
* an initial reference count on @callback_data, and thus * an initial reference count on @callback_data, and thus
* @callback_funcs->unref will eventually be called once more * @callback_funcs->unref will eventually be called once more
* than @callback_funcs->ref. * than @callback_funcs->ref.

View File

@ -555,7 +555,7 @@ g_string_insert_c (GString *string,
/** /**
* g_string_insert_unichar: * g_string_insert_unichar:
* @string: a #Gstring * @string: a #GString
* @pos: the position at which to insert character, or -1 to * @pos: the position at which to insert character, or -1 to
* append at the end of the string. * append at the end of the string.
* @wc: a Unicode character * @wc: a Unicode character

View File

@ -271,7 +271,7 @@ g_tree_destroy (GTree *tree)
/** /**
* g_tree_insert: * g_tree_insert:
* @tree: a #Gtree. * @tree: a #GTree.
* @key: the key to insert. * @key: the key to insert.
* @value: the value corresponding to the key. * @value: the value corresponding to the key.
* *
@ -302,7 +302,7 @@ g_tree_insert (GTree *tree,
/** /**
* g_tree_replace: * g_tree_replace:
* @tree: a #Gtree. * @tree: a #GTree.
* @key: the key to insert. * @key: the key to insert.
* @value: the value corresponding to the key. * @value: the value corresponding to the key.
* *
@ -334,7 +334,7 @@ g_tree_replace (GTree *tree,
/** /**
* g_tree_remove: * g_tree_remove:
* @tree: a #Gtree. * @tree: a #GTree.
* @key: the key to remove. * @key: the key to remove.
* *
* Removes a key/value pair from a #GTree. * Removes a key/value pair from a #GTree.
@ -354,7 +354,7 @@ g_tree_remove (GTree *tree,
/** /**
* g_tree_steal: * g_tree_steal:
* @tree: a #Gtree. * @tree: a #GTree.
* @key: the key to remove. * @key: the key to remove.
* *
* Removes a key and its associated value from a #GTree without calling * Removes a key and its associated value from a #GTree without calling

View File

@ -632,8 +632,8 @@ get_package_directory_from_module (gchar *module_name)
* is the same identifier as used for * is the same identifier as used for
* <literal>GETTEXT_PACKAGE</literal> in software configured according * <literal>GETTEXT_PACKAGE</literal> in software configured according
* to GNU standards. The function first looks in the Windows Registry * to GNU standards. The function first looks in the Windows Registry
* for the value <literal>#InstallationDirectory</literal> in the key * for the value <literal>&hash;InstallationDirectory</literal> in the key
* <literal>#HKLM\Software\@package</literal>, and if that value * <literal>&hash;HKLM\Software\@package</literal>, and if that value
* exists and is a string, returns that. * exists and is a string, returns that.
* *
* If @package is %NULL, or the above value isn't found in the * If @package is %NULL, or the above value isn't found in the