Add --sgml-mode to allow sgml in doc-fragments (which somehow works before

* docs/reference/gobject/Makefile.am:
	  Add --sgml-mode to allow sgml in doc-fragments (which somehow works
	  before already).
	* gobject/gboxed.h:
	* gobject/gclosure.c:
	* gobject/gparam.c:
	* gobject/gparam.h:
	* gobject/gtype.h:
	  Convert character entities back. FIx some broken sgml.


svn path=/trunk/; revision=7078
This commit is contained in:
Stefan Kost 2008-06-21 17:25:17 +00:00
parent f2da2e8e92
commit f22d19fc34
7 changed files with 50 additions and 36 deletions

View File

@ -1,3 +1,16 @@
2008-06-21 Stefan Kost <ensonic@users.sf.net>
* docs/reference/gobject/Makefile.am:
Add --sgml-mode to allow sgml in doc-fragments (which somehow works
before already).
* gobject/gboxed.h:
* gobject/gclosure.c:
* gobject/gparam.c:
* gobject/gparam.h:
* gobject/gtype.h:
Convert character entities back. FIx some broken sgml.
2008-06-21 Stefan Kost <ensonic@users.sf.net> 2008-06-21 Stefan Kost <ensonic@users.sf.net>
* docs/reference/gobject/tmpl/gtypemodule.sgml: * docs/reference/gobject/tmpl/gtypemodule.sgml:

View File

@ -33,7 +33,7 @@ GTKDOC_LIBS = \
$(top_builddir)/gobject/libgobject-2.0.la $(top_builddir)/gobject/libgobject-2.0.la
# Extra options to supply to gtkdoc-mkdb # Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS= MKDB_OPTIONS=--sgml-mode
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = version.xml \ content_files = version.xml \

View File

@ -124,7 +124,7 @@ GType g_boxed_type_register_static (const gchar *name,
* *
* *
* gchar *writers[]; * gchar *writers[];
* g_object_get (obj, "authors", &amp;writers, NULL); * g_object_get (obj, "authors", &writers, NULL);
* // do something with writers * // do something with writers
* g_strfreev (writers); * g_strfreev (writers);
* ]| * ]|

View File

@ -41,8 +41,8 @@
* g_signal_new() specifies the default C marshaller for any closure which is * g_signal_new() specifies the default C marshaller for any closure which is
* connected to this signal. GObject provides a number of C marshallers * connected to this signal. GObject provides a number of C marshallers
* for this purpose, see the g_cclosure_marshal_*() functions. Additional * for this purpose, see the g_cclosure_marshal_*() functions. Additional
* C marshallers can be generated with the <link linkend="glib-genmarshal" * C marshallers can be generated with the
* >glib-genmarshal</link> utility. * <link linkend="glib-genmarshal">glib-genmarshal</link> utility.
* Closures can be explicitly connected to signals with * Closures can be explicitly connected to signals with
* g_signal_connect_closure(), but it usually more convenient to let GObject * g_signal_connect_closure(), but it usually more convenient to let GObject
* create a closure automatically by using one of the g_signal_connect_*() * create a closure automatically by using one of the g_signal_connect_*()

View File

@ -32,6 +32,7 @@
* All other characters are replaced by a '-' during construction. * All other characters are replaced by a '-' during construction.
* The result of this replacement is called the canonical name of the * The result of this replacement is called the canonical name of the
* parameter. * parameter.
* </para>
*/ */
/* /*
* MT safe * MT safe

View File

@ -185,8 +185,8 @@ typedef struct _GParamSpecPool GParamSpecPool;
* @value_type: the #GValue type for this parameter * @value_type: the #GValue type for this parameter
* @owner_type: #GType type that uses (introduces) this paremeter * @owner_type: #GType type that uses (introduces) this paremeter
* *
* All fields of the <structname>GParamSpec</structname> struct are private and * All other fields of the <structname>GParamSpec</structname> struct are private and
* should not be used directly, except for the following: * should not be used directly.
*/ */
struct _GParamSpec struct _GParamSpec
{ {

View File

@ -700,7 +700,7 @@ typedef void (*GBaseFinalizeFunc) (gpointer g_class);
* of a specific type. This function should initialize all static class * of a specific type. This function should initialize all static class
* members. * members.
* The initialization process of a class involves: * The initialization process of a class involves:
* <variablelist> * <itemizedlist>
* <listitem><para> * <listitem><para>
* 1 - Copying common members from the parent class over to the * 1 - Copying common members from the parent class over to the
* derived class structure. * derived class structure.
@ -716,7 +716,7 @@ typedef void (*GBaseFinalizeFunc) (gpointer g_class);
* <listitem><para> * <listitem><para>
* 4 - Invocation of the class' GClassInitFunc() initializer. * 4 - Invocation of the class' GClassInitFunc() initializer.
* </para></listitem> * </para></listitem>
* </variablelist> * </itemizedlist>
* Since derived classes are partially initialized through a memory copy * Since derived classes are partially initialized through a memory copy
* of the parent class, the general rule is that GBaseInitFunc() and * of the parent class, the general rule is that GBaseInitFunc() and
* GBaseFinalizeFunc() should take care of necessary reinitialization * GBaseFinalizeFunc() should take care of necessary reinitialization
@ -993,7 +993,7 @@ struct _GInterfaceInfo
/** /**
* GTypeValueTable: * GTypeValueTable:
* @value_init: Default initialize @values contents by poking values * @value_init: Default initialize @values contents by poking values
* directly into the value-&gt;data array. The data array of * directly into the value->data array. The data array of
* the #GValue passed into this function was zero-filled * the #GValue passed into this function was zero-filled
* with <function>memset()</function>, so no care has to * with <function>memset()</function>, so no care has to
* be taken to free any * be taken to free any
@ -1001,7 +1001,7 @@ struct _GInterfaceInfo
* value that may never be %NULL, the implementation might * value that may never be %NULL, the implementation might
* look like: * look like:
* |[ * |[
* value-&gt;data[0].v_pointer = g_strdup (""); * value->data[0].v_pointer = g_strdup ("");
* ]| * ]|
* @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
@ -1009,8 +1009,8 @@ struct _GInterfaceInfo
* this function returns. E.g. for our above string type: * this function returns. E.g. for our above string type:
* |[ * |[
* // 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 &amp; G_VALUE_NOCOPY_CONTENTS)) * if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
* g_free (value-&gt;data[0].v_pointer); * g_free (value->data[0].v_pointer);
* ]| * ]|
* @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
@ -1020,29 +1020,29 @@ struct _GInterfaceInfo
* @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:
* |[ * |[
* dest_value-&gt;data[0].v_pointer = g_strdup (src_value-&gt;data[0].v_pointer); * dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
* ]| * ]|
* @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:
* |[ * |[
* return value-&gt;data[0].v_pointer; * return value->data[0].v_pointer;
* ]| * ]|
* @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, and the characters themselves indicate * an argument to be collected, and the characters themselves indicate
* the type of the argument. Currently supported arguments are: * the type of the argument. Currently supported arguments are:
* <variablelist> * <variablelist>
* <varlistentry><term></term><listitem><para> * <varlistentry><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>
* <varlistentry><term></term><listitem><para> * <varlistentry><term /><listitem><para>
* 'l' - Longs. passed as collect_values[].v_long. * 'l' - Longs. passed as collect_values[].v_long.
* </para></listitem></varlistentry> * </para></listitem></varlistentry>
* <varlistentry><term></term><listitem><para> * <varlistentry><term /><listitem><para>
* 'd' - Doubles. passed as collect_values[].v_double. * 'd' - Doubles. passed as collect_values[].v_double.
* </para></listitem></varlistentry> * </para></listitem></varlistentry>
* <varlistentry><term></term><listitem><para> * <varlistentry><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> * </variablelist>
@ -1064,7 +1064,7 @@ struct _GInterfaceInfo
* length @n_collect_values, containing the collected values * length @n_collect_values, containing the collected values
* according to @collect_format. * according to @collect_format.
* @collect_flags is an argument provided as a hint by the caller. * @collect_flags is an argument provided as a hint by the caller.
* It may contain the flag #G_VALUE_NOCOPY_CONTENTS indicating, * It may contain the flag %G_VALUE_NOCOPY_CONTENTS indicating,
* that the collected value contents may be considered "static" * that the collected value contents may be considered "static"
* for the duration of the @value lifetime. * for the duration of the @value lifetime.
* Thus an extra copy of the contents stored in @collect_values is * Thus an extra copy of the contents stored in @collect_values is
@ -1073,21 +1073,21 @@ struct _GInterfaceInfo
* |[ * |[
* 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 &amp; G_VALUE_NOCOPY_CONTENTS) * else if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
* { * {
* value-&gt;data[0].v_pointer = collect_values[0].v_pointer; * value->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
* value-&gt;data[1].v_uint = G_VALUE_NOCOPY_CONTENTS; * value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
* } * }
* else * else
* value-&gt;data[0].v_pointer = g_strdup (collect_values[0].v_pointer); * value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer);
* return NULL; * return NULL;
* ]| * ]|
* 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
* by the #GSignal code, reference counts should always be incremented * by the #GSignal code, reference counts should always be incremented
* for reference counted contents stored in the value-&gt;data array. * for reference counted contents stored in the value->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:
* |[ * |[
@ -1095,7 +1095,7 @@ struct _GInterfaceInfo
* { * {
* GObject *object = G_OBJECT (collect_values[0].v_pointer); * GObject *object = G_OBJECT (collect_values[0].v_pointer);
* // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types * // never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types
* value-&gt;data[0].v_pointer = g_object_ref (object); * value->data[0].v_pointer = g_object_ref (object);
* return NULL; * return NULL;
* } * }
* else * else
@ -1124,9 +1124,9 @@ struct _GInterfaceInfo
* arguments passed through a variable argument list which got * arguments passed through a variable argument list which got
* collected into @collect_values according to @lcopy_format. * collected into @collect_values according to @lcopy_format.
* @n_collect_values equals the string length of @lcopy_format, * @n_collect_values equals the string length of @lcopy_format,
* and @collect_flags may contain #G_VALUE_NOCOPY_CONTENTS. * and @collect_flags may contain %G_VALUE_NOCOPY_CONTENTS.
* In contrast to collect_value(), lcopy_value() is obliged to * In contrast to collect_value(), lcopy_value() is obliged to
* always properly support #G_VALUE_NOCOPY_CONTENTS. * always properly support %G_VALUE_NOCOPY_CONTENTS.
* 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:
@ -1134,10 +1134,10 @@ struct _GInterfaceInfo
* 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 &amp; G_VALUE_NOCOPY_CONTENTS) * if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
* *string_p = value-&gt;data[0].v_pointer; * *string_p = value->data[0].v_pointer;
* else * else
* *string_p = g_strdup (value-&gt;data[0].v_pointer); * *string_p = g_strdup (value->data[0].v_pointer);
* ]| * ]|
* And an illustrative version of lcopy_value() for * And an illustrative version of lcopy_value() for
* reference-counted types: * reference-counted types:
@ -1145,12 +1145,12 @@ struct _GInterfaceInfo
* GObject **object_p = collect_values[0].v_pointer; * GObject **object_p = collect_values[0].v_pointer;
* if (!object_p) * if (!object_p)
* 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->data[0].v_pointer)
* *object_p = NULL; * *object_p = NULL;
* else if (collect_flags &amp; G_VALUE_NOCOPY_CONTENTS) // always honour * else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour
* *object_p = value-&gt;data[0].v_pointer; * *object_p = value->data[0].v_pointer;
* else * else
* *object_p = g_object_ref (value-&gt;data[0].v_pointer); * *object_p = g_object_ref (value->data[0].v_pointer);
* return NULL; * return NULL;
* ]| * ]|
* *
@ -1323,12 +1323,12 @@ gpointer g_type_instance_get_private (GTypeInstance *instance,
* 0, // n_preallocs * 0, // n_preallocs
* (GInstanceInitFunc) gtk_gadget_init, * (GInstanceInitFunc) gtk_gadget_init,
* }; * };
* g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &amp;g_define_type_info, 0); * g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &g_define_type_info, 0);
* { * {
* static const GInterfaceInfo g_implement_interface_info = { * static const GInterfaceInfo g_implement_interface_info = {
* (GInterfaceInitFunc) gtk_gadget_gizmo_init * (GInterfaceInitFunc) gtk_gadget_gizmo_init
* }; * };
* g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &amp;g_implement_interface_info); * g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
* } * }
* } * }
* return g_define_type_id; * return g_define_type_id;