[glib] Annotate all examples with their language



commit adf892e96af403b8950dff1a370e4270ffaebc62
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 1 15:11:49 2014 -0500

    Annotate all examples with their language
    
    The C ones, at least.

 gio/gactionmap.c          |    2 +-
 gio/gasyncinitable.c      |    2 +-
 gio/gasyncresult.c        |    2 +-
 gio/gcancellable.c        |    2 +-
 gio/gdbusconnection.c     |    4 ++--
 gio/gdbuserror.c          |    2 +-
 gio/gdbusproxy.c          |    6 +++---
 gio/gfileenumerator.c     |    2 +-
 gio/giomodule.c           |    4 ++--
 gio/gmemoryoutputstream.c |    2 +-
 gio/gsettingsschema.c     |    4 ++--
 gio/gsimpleaction.c       |    2 +-
 gio/gsimpleasyncresult.c  |    2 +-
 gio/gsocketconnectable.c  |    2 +-
 gio/gtask.c               |    8 ++++----
 gio/gthemedicon.c         |    4 ++--
 gio/gvolume.c             |    4 ++--
 glib/docs.c               |   32 ++++++++++++++++----------------
 glib/garray.c             |    8 ++++----
 glib/gasyncqueue.c        |    2 +-
 glib/gbacktrace.c         |    2 +-
 glib/gdate.c              |    4 ++--
 glib/gerror.c             |   18 +++++++++---------
 glib/gfileutils.c         |    2 +-
 glib/ggettext.c           |    8 ++++----
 glib/ghash.c              |    2 +-
 glib/glist.c              |   16 ++++++++--------
 glib/gmain.c              |   12 ++++++------
 glib/gmarkup.c            |    8 ++++----
 glib/gmessages.c          |    8 ++++----
 glib/goption.c            |    4 ++--
 glib/gregex.c             |    6 +++---
 glib/gslice.c             |    4 ++--
 glib/gslist.c             |    8 ++++----
 glib/gstrfuncs.c          |    6 +++---
 glib/gtestutils.c         |    8 ++++----
 glib/gthread-posix.c      |   10 +++++-----
 glib/gthread.c            |   16 ++++++++--------
 glib/gvariant-parser.c    |    6 +++---
 glib/gvariant.c           |    8 ++++----
 gmodule/gmodule.c         |    2 +-
 gobject/gbinding.c        |    6 +++---
 gobject/gclosure.c        |    8 ++++----
 gobject/genums.c          |    2 +-
 gobject/gobject.c         |   22 +++++++++++-----------
 gobject/gtype.c           |    2 +-
 gobject/gtypeplugin.c     |    2 +-
 gobject/gvalue.c          |    2 +-
 gobject/gvaluearray.c     |    4 ++--
 49 files changed, 151 insertions(+), 151 deletions(-)
---
diff --git a/gio/gactionmap.c b/gio/gactionmap.c
index be4fe4d..cc4fdfe 100644
--- a/gio/gactionmap.c
+++ b/gio/gactionmap.c
@@ -160,7 +160,7 @@ g_action_map_remove_action (GActionMap  *action_map,
  *
  * Each action is constructed as per one #GActionEntry.
  *
- * |[
+ * |[<!-- language="C" -->
  * static void
  * activate_quit (GSimpleAction *simple,
  *                GVariant      *parameter,
diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c
index 0587575..83bb78e 100644
--- a/gio/gasyncinitable.c
+++ b/gio/gasyncinitable.c
@@ -47,7 +47,7 @@
  *
  * A typical implementation might look something like this:
  *
- * |[
+ * |[<!-- language="C" -->
  * enum {
  *    NOT_INITIALIZED,
  *    INITIALIZING,
diff --git a/gio/gasyncresult.c b/gio/gasyncresult.c
index eadca88..3d9848c 100644
--- a/gio/gasyncresult.c
+++ b/gio/gasyncresult.c
@@ -57,7 +57,7 @@
  * however, the "_finish()" function may be called at most once.
  *
  * Example of a typical asynchronous operation flow:
- * |[
+ * |[<!-- language="C" -->
  * void _theoretical_frobnitz_async (Theoretical         *t,
  *                                   GCancellable        *c,
  *                                   GAsyncReadyCallback  cb,
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index 5d9c9b6..6c3254d 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -105,7 +105,7 @@ g_cancellable_class_init (GCancellableClass *klass)
    * like this.
    *
    * An example of how to us this:
-   * |[
+   * |[<!-- language="C" -->
    *     /&ast; Make sure we don't do unnecessary work if already cancelled &ast;/
    *     if (g_cancellable_set_error_if_cancelled (cancellable, error))
    *       return;
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 5ba1a94..09e6187 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -5794,7 +5794,7 @@ g_dbus_connection_call_sync_internal (GDBusConnection         *connection,
  *
  * If the @parameters #GVariant is floating, it is consumed. This allows
  * convenient 'inline' use of g_variant_new(), e.g.:
- * |[
+ * |[<!-- language="C" -->
  *  g_dbus_connection_call (connection,
  *                          "org.freedesktop.StringThings",
  *                          "/org/freedesktop/StringThings",
@@ -5895,7 +5895,7 @@ g_dbus_connection_call_finish (GDBusConnection  *connection,
  *
  * If the @parameters #GVariant is floating, it is consumed.
  * This allows convenient 'inline' use of g_variant_new(), e.g.:
- * |[
+ * |[<!-- language="C" -->
  *  g_dbus_connection_call_sync (connection,
  *                               "org.freedesktop.StringThings",
  *                               "/org/freedesktop/StringThings",
diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c
index 4037f0b..98dab3a 100644
--- a/gio/gdbuserror.c
+++ b/gio/gdbuserror.c
@@ -55,7 +55,7 @@
  * automatically map from D-Bus errors to #GError and back. This
  * is typically done in the function returning the #GQuark for the
  * error domain:
- * |[
+ * |[<!-- language="C" -->
  * /&ast; foo-bar-error.h: &ast;/
  *
  * #define FOO_BAR_ERROR (foo_bar_error_quark ())
diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
index 5df0388..c66cc1c 100644
--- a/gio/gdbusproxy.c
+++ b/gio/gdbusproxy.c
@@ -786,7 +786,7 @@ g_dbus_proxy_get_cached_property (GDBusProxy   *proxy,
  *
  * If the @value #GVariant is floating, it is consumed. This allows
  * convenient 'inline' use of g_variant_new(), e.g.
- * |[
+ * |[<!-- language="C" -->
  *  g_dbus_proxy_set_cached_property (proxy,
  *                                    "SomeProperty",
  *                                    g_variant_new ("(si)",
@@ -2966,7 +2966,7 @@ g_dbus_proxy_call_sync_internal (GDBusProxy      *proxy,
  *
  * If the @parameters #GVariant is floating, it is consumed. This allows
  * convenient 'inline' use of g_variant_new(), e.g.:
- * |[
+ * |[<!-- language="C" -->
  *  g_dbus_proxy_call (proxy,
  *                     "TwoStrings",
  *                     g_variant_new ("(ss)",
@@ -3057,7 +3057,7 @@ g_dbus_proxy_call_finish (GDBusProxy    *proxy,
  *
  * If the @parameters #GVariant is floating, it is consumed. This allows
  * convenient 'inline' use of g_variant_new(), e.g.:
- * |[
+ * |[<!-- language="C" -->
  *  g_dbus_proxy_call_sync (proxy,
  *                          "TwoStrings",
  *                          g_variant_new ("(ss)",
diff --git a/gio/gfileenumerator.c b/gio/gfileenumerator.c
index f7b8de4..3b05782 100644
--- a/gio/gfileenumerator.c
+++ b/gio/gfileenumerator.c
@@ -603,7 +603,7 @@ g_file_enumerator_get_container (GFileEnumerator *enumerator)
  * inside loops with g_file_enumerator_next_file().
  *
  * This is a convenience method that's equivalent to:
- * |[
+ * |[<!-- language="C" -->
  *   gchar *name = g_file_info_get_name (info);
  *   GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr),
  *                                    name);
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 9b57239..056a899 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -77,7 +77,7 @@
  * of an extension point has a name, and a priority. Use
  * g_io_extension_point_implement() to implement an extension point.
  * 
- *  |[
+ *  |[<!-- language="C" -->
  *  GIOExtensionPoint *ep;
  *
  *  /&ast; Register an extension point &ast;/
@@ -85,7 +85,7 @@
  *  g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
  *  ]|
  *
- *  |[
+ *  |[<!-- language="C" -->
  *  /&ast; Implement an extension point &ast;/
  *  G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
  *  g_io_extension_point_implement ("my-extension-point",
diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c
index bef6397..a986079 100644
--- a/gio/gmemoryoutputstream.c
+++ b/gio/gmemoryoutputstream.c
@@ -367,7 +367,7 @@ g_memory_output_stream_init (GMemoryOutputStream *stream)
  * @size as 0 (allowing #GMemoryOutputStream to do the initial
  * allocation for itself).
  *
- * |[
+ * |[<!-- language="C" -->
  * /&ast; a stream that can grow &ast;/
  * stream = g_memory_output_stream_new (NULL, 0, realloc, free);
  *
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index f3009c0..067e678 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -52,7 +52,7 @@
  *
  * Consider the following example:
  *
- * |[
+ * |[<!-- language="C" -->
  * typedef struct
  * {
  *    ...
@@ -109,7 +109,7 @@
  * ships a gschemas.compiled file as part of itself, and then simply do
  * the following:
  *
- * |[
+ * |[<!-- language="C" -->
  * {
  *   GSettings *settings;
  *   gint some_value;
diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c
index 7c1a43b..0ec3ef5 100644
--- a/gio/gsimpleaction.c
+++ b/gio/gsimpleaction.c
@@ -399,7 +399,7 @@ g_simple_action_class_init (GSimpleActionClass *class)
    * call g_simple_action_set_state() from the handler.
    *
    * An example of a 'change-state' handler:
-   * |[
+   * |[<!-- language="C" -->
    * static void
    * change_volume_state (GSimpleAction *action,
    *                      GVariant      *value,
diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c
index bdda4d5..406b6e9 100644
--- a/gio/gsimpleasyncresult.c
+++ b/gio/gsimpleasyncresult.c
@@ -106,7 +106,7 @@
  * #GAsyncResult.  A typical implementation of an asynchronous operation
  * using GSimpleAsyncResult looks something like this:
  *
- * |[
+ * |[<!-- language="C" -->
  * static void
  * baked_cb (Cake    *cake,
  *           gpointer user_data)
diff --git a/gio/gsocketconnectable.c b/gio/gsocketconnectable.c
index e51cf81..46870fe 100644
--- a/gio/gsocketconnectable.c
+++ b/gio/gsocketconnectable.c
@@ -32,7 +32,7 @@
  * to try out each socket address in turn until one succeeds, as shown
  * in the sample code below.
  *
- * |[
+ * |[<!-- language="C" -->
  * MyConnectionType *
  * connect_to_host (const char    *hostname,
  *                  guint16        port,
diff --git a/gio/gtask.c b/gio/gtask.c
index 30bb007..d03cefc 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -50,7 +50,7 @@
  * the return value.
  *
  * Here is an example for using GTask as a GAsyncResult:
- * |[
+ * |[<!-- language="C" -->
  *     typedef struct {
  *       CakeFrostingType frosting;
  *       char *message;
@@ -158,7 +158,7 @@
  * and priority).
  *
  * Here is an example for chained asynchronous operations:
- *   |[
+ *   |[<!-- language="C" -->
  *     typedef struct {
  *       Cake *cake;
  *       CakeFrostingType frosting;
@@ -293,7 +293,7 @@
  * #GMainContext when it completes.
  *
  * Running a task in a thread:
- *   |[
+ *   |[<!-- language="C" -->
  *     typedef struct {
  *       guint radius;
  *       CakeFlavor flavor;
@@ -377,7 +377,7 @@
  * synchronous variants of blocking APIs.
  *
  * Cancelling a task:
- *   |[
+ *   |[<!-- language="C" -->
  *     static void
  *     bake_cake_thread (GTask         *task,
  *                       gpointer       source_object,
diff --git a/gio/gthemedicon.c b/gio/gthemedicon.c
index 4990766..3d72bc2 100644
--- a/gio/gthemedicon.c
+++ b/gio/gthemedicon.c
@@ -257,7 +257,7 @@ g_themed_icon_class_init (GThemedIconClass *klass)
    *
    * For example, if the icon name was "gnome-dev-cdrom-audio", the array 
    * would become
-   * |[
+   * |[<!-- language="C" -->
    * {
    *   "gnome-dev-cdrom-audio",
    *   "gnome-dev-cdrom",
@@ -345,7 +345,7 @@ g_themed_icon_new_from_names (char **iconnames,
  * that can be created by shortening @iconname at '-' characters.
  * 
  * In the following example, @icon1 and @icon2 are equivalent:
- * |[
+ * |[<!-- language="C" -->
  * const char *names[] = { 
  *   "gnome-dev-cdrom-audio",
  *   "gnome-dev-cdrom",
diff --git a/gio/gvolume.c b/gio/gvolume.c
index 3998dbe..fb5fc81 100644
--- a/gio/gvolume.c
+++ b/gio/gvolume.c
@@ -622,7 +622,7 @@ g_volume_enumerate_identifiers (GVolume *volume)
  * either be equal or a prefix of what this function returns. In
  * other words, in code
  *
- * |[
+ * |[<!-- language="C" -->
  *   GMount *mount;
  *   GFile *mount_root
  *   GFile *volume_activation_root;
@@ -632,7 +632,7 @@ g_volume_enumerate_identifiers (GVolume *volume)
  *   volume_activation_root = g_volume_get_activation_root (volume); /&ast; assume not NULL &ast;/
  * ]|
  * then the expression
- * |[
+ * |[<!-- language="C" -->
  *   (g_file_has_prefix (volume_activation_root, mount_root) ||
       g_file_equal (volume_activation_root, mount_root))
  * ]|
diff --git a/glib/docs.c b/glib/docs.c
index 199aeda..08f03a6 100644
--- a/glib/docs.c
+++ b/glib/docs.c
@@ -259,7 +259,7 @@
  * and conversion specifier and append a conversion specifier.
  *
  * The following example prints "0x7b";
- * |[
+ * |[<!-- language="C" -->
  * gint16 value = 123;
  * g_print ("%#" G_GINT16_MODIFIER "x", value);
  * ]|
@@ -275,7 +275,7 @@
  * include the percent-sign, such that you can add precision and length
  * modifiers between percent-sign and conversion specifier.
  *
- * |[
+ * |[<!-- language="C" -->
  * gint16 in;
  * gint32 out;
  * sscanf ("42", "%" G_GINT16_FORMAT, &in)
@@ -721,7 +721,7 @@
  * data" to a callback, in the form of a void pointer. From time to time
  * you want to pass an integer instead of a pointer. You could allocate
  * an integer, with something like:
- * |[
+ * |[<!-- language="C" -->
  *   int *ip = g_new (int, 1);
  *   *ip = 42;
  * ]|
@@ -731,7 +731,7 @@
  * Pointers are always at least 32 bits in size (on all platforms GLib
  * intends to support). Thus you can store at least 32-bit integer values
  * in a pointer value. Naively, you might try this, but it's incorrect:
- * |[
+ * |[<!-- language="C" -->
  *   gpointer p;
  *   int i;
  *   p = (void*) 42;
@@ -739,7 +739,7 @@
  * ]|
  * Again, that example was not correct, don't copy it.
  * The problem is that on some systems you need to do this:
- * |[
+ * |[<!-- language="C" -->
  *   gpointer p;
  *   int i;
  *   p = (void*) (long) 42;
@@ -1777,14 +1777,14 @@
  * Accepts a macro or a string and converts it into a string after
  * preprocessor argument expansion. For example, the following code:
  *
- * |[
+ * |[<!-- language="C" -->
  * #define AGE 27
  * const gchar *greeting = G_STRINGIFY (AGE) " today!";
  * ]|
  *
  * is transformed by the preprocessor into (code equivalent to):
  *
- * |[
+ * |[<!-- language="C" -->
  * const gchar *greeting = "27 today!";
  * ]|
  */
@@ -1798,7 +1798,7 @@
  * @identifier1identifier2 from its expanded
  * arguments @identifier1 and @identifier2. For example,
  * the following code:
- * |[
+ * |[<!-- language="C" -->
  * #define GET(traveller,method) G_PASTE(traveller_get_, method) (traveller)
  * const gchar *name = GET (traveller, name);
  * const gchar *quest = GET (traveller, quest);
@@ -1806,7 +1806,7 @@
  * ]|
  *
  * is transformed by the preprocessor into:
- * |[
+ * |[<!-- language="C" -->
  * const gchar *name = traveller_get_name (traveller);
  * const gchar *quest = traveller_get_quest (traveller);
  * GdkColor *favourite = traveller_get_favourite_colour (traveller);
@@ -1846,7 +1846,7 @@
  * Its value should be ignored. This can be accomplished by placing
  * it as the first argument of a comma expression.
  *
- * |[
+ * |[<!-- language="C" -->
  * #define ADD_ONE_TO_INT(x) \
  *   (G_STATIC_ASSERT_EXPR(sizeof (x) == sizeof (int)), ((x) + 1))
  * ]|
@@ -2078,7 +2078,7 @@
  * semicolon. For arguments, place the attribute at the beginning of the
  * argument declaration.
  *
- * |[
+ * |[<!-- language="C" -->
  * void my_unused_function (G_GNUC_UNUSED gint unused_argument,
  *                          gint other_argument) G_GNUC_UNUSED;
  * ]|
@@ -2102,7 +2102,7 @@
  *
  * See the GNU C documentation for more details.
  *
- * |[
+ * |[<!-- language="C" -->
  * gint g_snprintf (gchar  *string,
  *                  gulong       n,
  *                  gchar const *format,
@@ -2141,7 +2141,7 @@
  *
  * See the GNU C documentation for more details.
  *
- * |[
+ * |[<!-- language="C" -->
  * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
  * ]|
  */
@@ -2223,7 +2223,7 @@
  * function declaration. While GCC allows the macro after the declaration,
  * Sun Studio does not.
  *
- * |[
+ * |[<!-- language="C" -->
  * G_GNUC_INTERNAL
  * void _g_log_fallback_handler (const gchar    *log_domain,
  *                               GLogLevelFlags  log_level,
@@ -2253,7 +2253,7 @@
  * Hints the compiler that the expression is likely to evaluate to
  * a true value. The compiler may use this information for optimizations.
  *
- * |[
+ * |[<!-- language="C" -->
  * if (G_LIKELY (random () != 1))
  *   g_print ("not one");
  * ]|
@@ -2270,7 +2270,7 @@
  * Hints the compiler that the expression is unlikely to evaluate to
  * a true value. The compiler may use this information for optimizations.
  *
- * |[
+ * |[<!-- language="C" -->
  * if (G_UNLIKELY (random () == 1))
  *   g_print ("a random one");
  * ]|
diff --git a/glib/garray.c b/glib/garray.c
index 5107dac..7db65a7 100644
--- a/glib/garray.c
+++ b/glib/garray.c
@@ -68,7 +68,7 @@
  * To free an array, use g_array_free().
  *
  * Here is an example that stores integers in a #GArray:
- * |[
+ * |[<!-- language="C" -->
  *   GArray *garray;
  *   gint i;
  *   /&ast; We create a new array to store gint values.
@@ -120,7 +120,7 @@ struct _GRealArray
  * value is cast to the given type.
  *
  * This example gets a pointer to an element in a #GArray:
- * |[
+ * |[<!-- language="C" -->
  *   EDayViewEvent *event;
  *   /&ast; This gets a pointer to the 4th element
  *    &ast; in the array of EDayViewEvent structs.
@@ -816,7 +816,7 @@ g_array_maybe_expand (GRealArray *array,
  * To free a pointer array, use g_ptr_array_free().
  *
  * An example using a #GPtrArray:
- * |[
+ * |[<!-- language="C" -->
  *   GPtrArray *gparray;
  *   gchar *string1 = "one", *string2 = "two", *string3 = "three";
  *
@@ -1514,7 +1514,7 @@ g_ptr_array_foreach (GPtrArray *array,
  * To free a #GByteArray, use g_byte_array_free().
  *
  * An example for using a #GByteArray:
- * |[
+ * |[<!-- language="C" -->
  *   GByteArray *gbarray;
  *   gint i;
  *
diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c
index 40ce372..42766ad 100644
--- a/glib/gasyncqueue.c
+++ b/glib/gasyncqueue.c
@@ -726,7 +726,7 @@ g_async_queue_length_unlocked (GAsyncQueue *queue)
  *
  * If you were sorting a list of priority numbers to make sure the
  * lowest priority would be at the top of the queue, you could use:
- * |[
+ * |[<!-- language="C" -->
  *  gint32 id1;
  *  gint32 id2;
  *
diff --git a/glib/gbacktrace.c b/glib/gbacktrace.c
index 17ded63..9928c91 100644
--- a/glib/gbacktrace.c
+++ b/glib/gbacktrace.c
@@ -101,7 +101,7 @@ volatile gboolean glib_on_error_halt = TRUE;
  * The following example shows how it can be used together with
  * the g_log() functions.
  *
- * |[
+ * |[<!-- language="C" -->
  * #include <glib.h>
  *
  * static void
diff --git a/glib/gdate.c b/glib/gdate.c
index 9e16890..e28b1c7 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -161,7 +161,7 @@
  * function.
  *
  * Instead, do the following:
- * |[
+ * |[<!-- language="C" -->
  * time_t ttime;
  * GTime gtime;
  *
@@ -1286,7 +1286,7 @@ g_date_set_parse (GDate       *d,
  * the user's current timezone.
  *
  * To set the value of a date to the current day, you could write:
- * |[
+ * |[<!-- language="C" -->
  *  g_date_set_time_t (date, time (NULL)); 
  * ]|
  *
diff --git a/glib/gerror.c b/glib/gerror.c
index fe6bd74..c29d479 100644
--- a/glib/gerror.c
+++ b/glib/gerror.c
@@ -53,7 +53,7 @@
  *
  * Functions that can fail take a return location for a #GError as their
  * last argument. For example:
- * |[
+ * |[<!-- language="C" -->
  * gboolean g_file_get_contents (const gchar  *filename,
  *                               gchar       **contents,
  *                               gsize        *length,
@@ -62,7 +62,7 @@
  * If you pass a non-%NULL value for the <literal>error</literal>
  * argument, it should point to a location where an error can be placed.
  * For example:
- * |[
+ * |[<!-- language="C" -->
  * gchar *contents;
  * GError *err = NULL;
  *
@@ -89,7 +89,7 @@
  * Because g_file_get_contents() returns %FALSE on failure, if you
  * are only interested in whether it failed and don't need to display
  * an error message, you can pass %NULL for the @error argument:
- * |[
+ * |[<!-- language="C" -->
  * if (g_file_get_contents ("foo.txt", &contents, NULL, NULL)) /&ast; ignore errors &ast;/
  *   /&ast; no error occurred &ast;/ ;
  * else
@@ -115,7 +115,7 @@
  * want to g_set_error(), then return immediately. g_set_error()
  * does nothing if the error location passed to it is %NULL.
  * Here's an example:
- * |[
+ * |[<!-- language="C" -->
  * gint
  * foo_open_file (GError **error)
  * {
@@ -141,7 +141,7 @@
  * function that can report a #GError. If the sub-function indicates
  * fatal errors in some way other than reporting a #GError, such as
  * by returning %TRUE on success, you can simply do the following:
- * |[
+ * |[<!-- language="C" -->
  * gboolean
  * my_function_that_can_fail (GError **err)
  * {
@@ -163,7 +163,7 @@
  * reporting a #GError, you need to create a temporary #GError
  * since the passed-in one may be %NULL. g_propagate_error() is
  * intended for use in this case.
- * |[
+ * |[<!-- language="C" -->
  * gboolean
  * my_function_that_can_fail (GError **err)
  * {
@@ -188,7 +188,7 @@
  * ]|
  *
  * Error pileups are always a bug. For example, this code is incorrect:
- * |[
+ * |[<!-- language="C" -->
  * gboolean
  * my_function_that_can_fail (GError **err)
  * {
@@ -215,7 +215,7 @@
  * of handling an error by always doing nothing about it. So the
  * following code is fine, assuming errors in sub_function_that_can_fail()
  * are not fatal to my_function_that_can_fail():
- * |[
+ * |[<!-- language="C" -->
  * gboolean
  * my_function_that_can_fail (GError **err)
  * {
@@ -246,7 +246,7 @@
  *
  * - The error domain is called &lt;NAMESPACE&gt;_&lt;MODULE&gt;_ERROR,
  *   for example %G_SPAWN_ERROR or %G_THREAD_ERROR:
- *   |[
+ *   |[<!-- language="C" -->
  *   #define G_SPAWN_ERROR g_spawn_error_quark ()
  *
  *   GQuark
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index afcf76d..99b4bc1 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -289,7 +289,7 @@ g_mkdir_with_parents (const gchar *pathname,
  * For example, you might think you could use %G_FILE_TEST_IS_SYMLINK
  * to know whether it is safe to write to a file without being
  * tricked into writing into a different location. It doesn't work!
- * |[
+ * |[<!-- language="C" -->
  * /&ast; DON'T DO THIS &ast;/
  *  if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK)) 
  *    {
diff --git a/glib/ggettext.c b/glib/ggettext.c
index 012dcff..d4402f9 100644
--- a/glib/ggettext.c
+++ b/glib/ggettext.c
@@ -476,7 +476,7 @@ g_dngettext (const gchar *domain,
  * <filename>glib/gi18n.h</filename>. For use in a library, you must include
  * <filename>glib/gi18n-lib.h</filename> after defining the %GETTEXT_PACKAGE
  * macro suitably for your library:
- * |[
+ * |[<!-- language="C" -->
  * #define GETTEXT_PACKAGE "gtk20"
  * #include <glib/gi18n-lib.h>
  * ]|
@@ -542,7 +542,7 @@ g_dngettext (const gchar *domain,
  * used as a context. This is mainly useful for short strings which
  * may need different translations, depending on the context in which
  * they are used.
- * |[
+ * |[<!-- language="C" -->
  * label1 = C_("Navigation", "Back");
  * label2 = C_("Body part", "Back");
  * ]|
@@ -564,7 +564,7 @@ g_dngettext (const gchar *domain,
  * where the translated strings can't be directly used, e.g. in string
  * array initializers. To get the translated string, call gettext()
  * at runtime.
- * |[
+ * |[<!-- language="C" -->
  * {
  *   static const char *messages[] = {
  *     N_("some very meaningful message"),
@@ -593,7 +593,7 @@ g_dngettext (const gchar *domain,
  * be directly used, e.g. in string array initializers. To get the
  * translated string, you should call g_dpgettext2() at runtime.
  *
- * |[
+ * |[<!-- language="C" -->
  * {
  *   static const char *messages[] = {
  *     NC_("some context", "some very meaningful message"),
diff --git a/glib/ghash.c b/glib/ghash.c
index ac91d50..8a99ff3 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -679,7 +679,7 @@ g_hash_table_new_full (GHashFunc      hash_func,
  * Initializes a key/value pair iterator and associates it with
  * @hash_table. Modifying the hash table after calling this function
  * invalidates the returned iterator.
- * |[
+ * |[<!-- language="C" -->
  * GHashTableIter iter;
  * gpointer key, value;
  *
diff --git a/glib/glist.c b/glib/glist.c
index 1096f86..7ed6d3c 100644
--- a/glib/glist.c
+++ b/glib/glist.c
@@ -75,7 +75,7 @@
  * g_list_insert() and g_list_insert_sorted().
  *
  * To visit all elements in the list, use a loop over the list:
- * |[
+ * |[<!-- language="C" -->
  * GList *l;
  * for (l = list; l != NULL; l = l->next)
  *   {
@@ -87,7 +87,7 @@
  *
  * To loop over the list and modify it (e.g. remove a certain element)
  * a while loop is more appropriate, for example:
- * |[
+ * |[<!-- language="C" -->
  * GList *l = list;
  * while (l != NULL)
  *   {
@@ -236,7 +236,7 @@ g_list_free_full (GList          *list,
  * to avoid the inefficiency is to use g_list_prepend() and reverse
  * the list with g_list_reverse() when all elements have been added.
  *
- * |[
+ * |[<!-- language="C" -->
  * /&ast; Notice that these are initialized to the empty list. &ast;/
  * GList *string_list = NULL, *number_list = NULL;
  *
@@ -288,7 +288,7 @@ g_list_append (GList    *list,
  * Note that the return value is the new start of the list,
  * which will have changed, so make sure you store the new value. 
  *
- * |[ 
+ * |[<!-- language="C" -->
  * /&ast; Notice that it is initialized to the empty list. &ast;/
  * GList *list = NULL;
  *
@@ -436,7 +436,7 @@ g_list_insert_before (GList    *list,
  *
  * This function is for example used to move an element in the list.
  * The following example moves an element to the top of the list:
- * |[
+ * |[<!-- language="C" -->
  * list = g_list_remove_link (list, llink);
  * list = g_list_concat (llink, list);
  * ]|
@@ -578,7 +578,7 @@ g_list_remove_all (GList         *list,
  * This function is for example used to move an element in the list
  * (see the example for g_list_concat()) or to remove an element in
  * the list before freeing its data:
- * |[
+ * |[<!-- language="C" --> 
  * list = g_list_remove_link (list, llink);
  * free_some_data_that_may_access_the_list_again (llink->data);
  * g_list_free (llink);
@@ -650,12 +650,12 @@ g_list_copy (GList *list)
  * if the copy function takes only one argument.
  *
  * For instance, if @list holds a list of GObjects, you can do:
- * |[
+ * |[<!-- language="C" -->   
  * another_list = g_list_copy_deep (list, (GCopyFunc) g_object_ref, NULL);
  * ]|
  *
  * And, to entirely free the new list, you could do:
- * |[
+ * |[<!-- language="C" --> 
  * g_list_free_full (another_list, g_object_unref);
  * ]|
  *
diff --git a/glib/gmain.c b/glib/gmain.c
index 3058b06..2d69914 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2741,7 +2741,7 @@ get_dispatch (void)
  * This function is useful in a situation like the following:
  * Imagine an extremely simple "garbage collected" system.
  *
- * |[
+ * |[<!-- language="C" --> 
  * static GList *free_list;
  * 
  * gpointer
@@ -2778,7 +2778,7 @@ 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()
  *
- * |[
+ * |[<!-- language="C" --> 
  * gpointer
  * allocate_memory (gsize size)
  * { 
@@ -2867,7 +2867,7 @@ g_main_current_source (void)
  * from within idle handlers, but may have freed the object 
  * before the dispatch of your idle handler.
  *
- * |[
+ * |[<!-- language="C" --> 
  * static gboolean 
  * idle_callback (gpointer data)
  * {
@@ -2905,7 +2905,7 @@ g_main_current_source (void)
  * this particular problem, is to check to if the source
  * has already been destroy within the callback.
  *
- * |[
+ * |[<!-- language="C" --> 
  * static gboolean 
  * idle_callback (gpointer data)
  * {
@@ -4321,7 +4321,7 @@ g_main_context_get_poll_func (GMainContext *context)
  * Another related use for this function is when implementing a main
  * loop with a termination condition, computed from multiple threads:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   #define NUM_TASKS 10
  *   static volatile gint tasks_remaining = NUM_TASKS;
  *   ...
@@ -4331,7 +4331,7 @@ g_main_context_get_poll_func (GMainContext *context)
  * ]|
  *  
  * Then in a thread:
- * |[
+ * |[<!-- language="C" --> 
  *   perform_work();
  *
  *   if (g_atomic_int_dec_and_test (&tasks_remaining))
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index add9013..785d0b1 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -1996,7 +1996,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
  * As an example, see the following implementation of a simple
  * parser that counts the number of tags encountered.
  *
- * |[
+ * |[<!-- language="C" --> 
  * typedef struct
  * {
  *   gint tag_count;
@@ -2038,7 +2038,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
  * In order to allow this parser to be easily used as a subparser, the
  * following interface is provided:
  *
- * |[
+ * |[<!-- language="C" --> 
  * void
  * start_counting (GMarkupParseContext *context)
  * {
@@ -2063,7 +2063,7 @@ g_markup_parse_context_get_user_data (GMarkupParseContext *context)
  *
  * The subparser would then be used as follows:
  *
- * |[
+ * |[<!-- language="C" --> 
  * static void start_element (context, element_name, ...)
  * {
  *   if (strcmp (element_name, "count-these") == 0)
@@ -2523,7 +2523,7 @@ g_markup_vprintf_escaped (const gchar *format,
  * output, without having to worry that the strings
  * might themselves contain markup.
  *
- * |[
+ * |[<!-- language="C" --> 
  * const char *store = "Fortnum & Mason";
  * const char *item = "Tea";
  * char *output;
diff --git a/glib/gmessages.c b/glib/gmessages.c
index b1dc708..a7dcd00 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -538,19 +538,19 @@ g_log_set_fatal_mask (const gchar   *log_domain,
  *
  * Here is an example for adding a log handler for all warning messages
  * in the default domain:
- * |[
+ * |[<!-- language="C" --> 
  * g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
  *                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
  * ]|
  *
  * This example adds a log handler for all critical messages from GTK+:
- * |[
+ * |[<!-- language="C" --> 
  * g_log_set_handler ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL
  *                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
  * ]|
  *
  * This example adds a log handler for all messages from GLib:
- * |[
+ * |[<!-- language="C" --> 
  * g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
  *                    | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
  * ]|
@@ -1146,7 +1146,7 @@ g_assert_warning (const char *log_domain,
  *
  * For example:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   /&ast; g_main_context_push_thread_default() should fail if the
  *    &ast; context is already owned by another thread.
  *    &ast;/
diff --git a/glib/goption.c b/glib/goption.c
index 2bff8f7..f017892 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -91,7 +91,7 @@
  *
  * Here is a complete example of setting up GOption to parse the example
  * commandline above and produce the example help output.
- * |[
+ * |[<!-- language="C" --> 
  * static gint repeats = 2;
  * static gint max_size = 8;
  * static gboolean verbose = FALSE;
@@ -150,7 +150,7 @@
  * The following example shows how you can use #GOptionContext directly
  * in order to correctly deal with Unicode filenames on Windows:
  *
- * |[
+ * |[<!-- language="C" --> 
  * int
  * main (int argc, char **argv)
  * {
diff --git a/glib/gregex.c b/glib/gregex.c
index 393637f..35b139e 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -1638,7 +1638,7 @@ g_regex_match_simple (const gchar        *pattern,
  * To retrieve all the non-overlapping matches of the pattern in
  * string you can use g_match_info_next().
  *
- * |[
+ * |[<!-- language="C" --> 
  * static void
  * print_uppercase_words (const gchar *string)
  * {
@@ -1711,7 +1711,7 @@ g_regex_match (const GRegex      *regex,
  * To retrieve all the non-overlapping matches of the pattern in
  * string you can use g_match_info_next().
  *
- * |[
+ * |[<!-- language="C" --> 
  * static void
  * print_uppercase_words (const gchar *string)
  * {
@@ -2834,7 +2834,7 @@ g_regex_replace_literal (const GRegex      *regex,
  *
  * The following example uses g_regex_replace_eval() to replace multiple
  * strings at once:
- * |[
+ * |[<!-- language="C" --> 
  * static gboolean
  * eval_cb (const GMatchInfo *info,
  *          GString          *res,
diff --git a/glib/gslice.c b/glib/gslice.c
index 9b04c1d..7364108 100644
--- a/glib/gslice.c
+++ b/glib/gslice.c
@@ -90,7 +90,7 @@
  * object size used at allocation time is still available when freeing.
  *
  * Here is an example for using the slice allocator:
- * |[
+ * |[<!-- language="C" --> 
  * gchar *mem[10000];
  * gint i;
  *
@@ -111,7 +111,7 @@
  *
  * And here is an example for using the using the slice allocator
  * with data structures:
- * |[
+ * |[<!-- language="C" --> 
  * GRealArray *array;
  *
  * /&ast; Allocate one block, using the g_slice_new() macro. &ast;/
diff --git a/glib/gslist.c b/glib/gslist.c
index 1915f91..4c6af46 100644
--- a/glib/gslist.c
+++ b/glib/gslist.c
@@ -191,7 +191,7 @@ g_slist_free_full (GSList         *list,
  * elements. A common idiom to avoid the inefficiency is to prepend
  * the elements and reverse the list when all elements have been added.
  *
- * |[
+ * |[<!-- language="C" --> 
  * /&ast; Notice that these are initialized to the empty list. &ast;/
  * GSList *list = NULL, *number_list = NULL;
  *
@@ -239,7 +239,7 @@ g_slist_append (GSList   *list,
  * The return value is the new start of the list, which
  * may have changed, so make sure you store the new value.
  *
- * |[
+ * |[<!-- language="C" --> 
  * /&ast; Notice that it is initialized to the empty list. &ast;/
  * GSList *list = NULL;
  * list = g_slist_prepend (list, "last");
@@ -584,12 +584,12 @@ g_slist_copy (GSList *list)
  * one argument.
  *
  * For instance, if @list holds a list of GObjects, you can do:
- * |[
+ * |[<!-- language="C" --> 
  * another_list = g_slist_copy_deep (list, (GCopyFunc) g_object_ref, NULL);
  * ]|
  *
  * And, to entirely free the new list, you could do:
- * |[
+ * |[<!-- language="C" --> 
  * g_slist_free_full (another_list, g_object_unref);
  * ]|
  *
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index f251539..aad8ab4 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -266,7 +266,7 @@
  * on systems with 64bit IEEE-compatible doubles.
  *
  * The typical usage would be something like:
- * |[
+ * |[<!-- language="C" --> 
  *   char buf[G_ASCII_DTOSTR_BUF_SIZE];
  *
  *   fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value));
@@ -1927,7 +1927,7 @@ g_strncasecmp (const gchar *s1,
  * changed to the @new_delimiter character. Modifies @string in place,
  * and returns @string itself, not a copy. The return value is to
  * allow nesting such as
- * |[
+ * |[<!-- language="C" --> 
  *   g_ascii_strup (g_strdelimit (str, "abc", '?'))
  * ]|
  *
@@ -1964,7 +1964,7 @@ g_strdelimit (gchar       *string,
  * replaces the character with @substitutor. Modifies @string in place,
  * and return @string itself, not a copy. The return value is to allow
  * nesting such as
- * |[
+ * |[<!-- language="C" --> 
  *   g_ascii_strup (g_strcanon (str, "abc", '?'))
  * ]|
  *
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index 7279eb7..eeb87d6 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -82,7 +82,7 @@
  *
  * The API is designed to handle creation and registration of test suites
  * and test cases implicitly. A simple call like
- * |[
+ * |[<!-- language="C" --> 
  *   g_test_add_func ("/misc/assertions", test_assertions);
  * ]|
  * creates a test suite called "misc" with a single test case named
@@ -411,7 +411,7 @@
  * The advantage of this macro is that it can produce a message that
  * includes the actual values of @s1 and @s2.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   g_assert_cmpstr (mystring, ==, "fubar");
  * ]|
  *
@@ -2637,7 +2637,7 @@ wait_for_child (GPid pid,
  * The forking parent process then asserts successful child program
  * termination and validates child program outputs.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   static void
  *   test_fork_patterns (void)
  *   {
@@ -2753,7 +2753,7 @@ g_test_trap_fork (guint64        usec_timeout,
  * <literal>my_object_new(1000000)</literal> will abort with an error
  * message.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   static void
  *   test_create_large_object_subprocess (void)
  *   {
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index ee6d81b..5ead8f1 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -141,7 +141,7 @@ g_mutex_get_impl (GMutex *mutex)
  * It is not necessary to initialize a mutex that has been
  * statically allocated.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   typedef struct {
  *     GMutex m;
  *     ...
@@ -313,7 +313,7 @@ g_rec_mutex_get_impl (GRecMutex *rec_mutex)
  * It is not necessary to initialise a recursive mutex that has been
  * statically allocated.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   typedef struct {
  *     GRecMutex m;
  *     ...
@@ -471,7 +471,7 @@ g_rw_lock_get_impl (GRWLock *lock)
  * necessary to initialise a reader-writer lock that has been statically
  * allocated.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   typedef struct {
  *     GRWLock l;
  *     ...
@@ -807,7 +807,7 @@ g_cond_broadcast (GCond *cond)
  * condition variable (extending the example presented in the
  * documentation for #GCond):
  *
- * |[
+ * |[<!-- language="C" --> 
  * gpointer
  * pop_data_timed (void)
  * {
@@ -917,7 +917,7 @@ g_cond_wait_until (GCond  *cond,
  * be properly initialised by default (ie: to all zeros).  See the
  * examples below.
  *
- * |[
+ * |[<!-- language="C" --> 
  * static GPrivate name_key = G_PRIVATE_INIT (g_free);
  *
  * /&ast; return value should not be freed &ast;/
diff --git a/glib/gthread.c b/glib/gthread.c
index 3bc2f17..198556a 100644
--- a/glib/gthread.c
+++ b/glib/gthread.c
@@ -158,7 +158,7 @@
  * give_me_next_number() example using the #G_LOCK macros:
  *
  * Here is an example for using the #G_LOCK convenience macros:
- * |[
+ * |[<!-- language="C" --> 
  *   G_LOCK_DEFINE (current_number);
  *
  *   int
@@ -227,7 +227,7 @@
  * access.
  *
  * Take for example the following function:
- * |[
+ * |[<!-- language="C" --> 
  *   int
  *   give_me_next_number (void)
  *   {
@@ -244,7 +244,7 @@
  * It is easy to see that this won't work in a multi-threaded
  * application. There current_number must be protected against shared
  * access. A #GMutex can be used as a solution to this problem:
- * |[
+ * |[<!-- language="C" --> 
  *   int
  *   give_me_next_number (void)
  *   {
@@ -307,7 +307,7 @@
  * g_rw_lock_reader_lock()).
  *
  * Here is an example for an array with access functions:
- * |[
+ * |[<!-- language="C" --> 
  *   GRWLock lock;
  *   GPtrArray *array;
  *
@@ -376,7 +376,7 @@
  *
  * Here is an example for using GCond to block a thread until a condition
  * is satisfied:
- * |[
+ * |[<!-- language="C" --> 
  *   gpointer current_data = NULL;
  *   GMutex data_mutex;
  *   GCond data_cond;
@@ -519,7 +519,7 @@ G_LOCK_DEFINE_STATIC (g_thread_new);
  *
  * A #GOnce must be initialized with this macro before it can be used.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   GOnce my_once = G_ONCE_INIT;
  * ]|
  *
@@ -559,7 +559,7 @@ G_LOCK_DEFINE_STATIC (g_thread_new);
  * Calling g_once() recursively on the same #GOnce struct in
  * @func will lead to a deadlock.
  *
- * |[
+ * |[<!-- language="C" --> 
  *   gpointer
  *   get_debug_flags (void)
  *   {
@@ -614,7 +614,7 @@ g_once_impl (GOnce       *once,
  * blocked until initialization completed. To be used in constructs
  * like this:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   static gsize initialization_value = 0;
  *
  *   if (g_once_init_enter (&initialization_value))
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index 401784c..d160d62 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -2480,14 +2480,14 @@ g_variant_new_parsed_va (const gchar *format,
  * g_variant_new() would have collected.
  *
  * Consider this simple example:
- * |[
+ * |[<!-- language="C" --> 
  *  g_variant_new_parsed ("[('one', 1), ('two', %i), (%s, 3)]", 2, "three");
  * ]|
  *
  * In the example, the variable argument parameters are collected and
  * filled in as if they were part of the original string to produce the
  * result of
- * |[
+ * |[<!-- language="C" --> 
  * [('one', 1), ('two', 2), ('three', 3)]
  * ]|
  *
@@ -2530,7 +2530,7 @@ g_variant_new_parsed (const gchar *format,
  *
  * This function might be used as follows:
  *
- * |[
+ * |[<!-- language="C" --> 
  * GVariant *
  * make_pointless_dictionary (void)
  * {
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 59b92dd..b97c62b 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -3068,7 +3068,7 @@ g_variant_iter_free (GVariantIter *iter)
  * you no longer need it.
  *
  * Here is an example for iterating with g_variant_iter_next_value():
- * |[
+ * |[<!-- language="C" --> 
  *   /&ast; recursively iterate a container &ast;/
  *   void
  *   iterate_container_recursive (GVariant *container)
@@ -4889,7 +4889,7 @@ g_variant_get_va (GVariant     *value,
  *
  * This function might be used as follows:
  *
- * |[
+ * |[<!-- language="C" --> 
  * GVariant *
  * make_pointless_dictionary (void)
  * {
@@ -4981,7 +4981,7 @@ g_variant_get_child (GVariant    *value,
  * the unpacking process.
  *
  * Here is an example for memory management with g_variant_iter_next():
- * |[
+ * |[<!-- language="C" --> 
  *   /&ast; Iterates a dictionary of type 'a{sv}' &ast;/
  *   void
  *   iterate_dictionary (GVariant *dictionary)
@@ -5073,7 +5073,7 @@ g_variant_iter_next (GVariantIter *iter,
  * g_variant_get(). Failure to do so will cause a memory leak.
  *
  * Here is an example for memory management with g_variant_iter_loop():
- * |[
+ * |[<!-- language="C" --> 
  *   /&ast; Iterates a dictionary of type 'a{sv}' &ast;/
  *   void
  *   iterate_dictionary (GVariant *dictionary)
diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c
index 95c6796..56c0e0f 100644
--- a/gmodule/gmodule.c
+++ b/gmodule/gmodule.c
@@ -80,7 +80,7 @@
  * it must ensure that it is never unloaded, by calling g_module_make_resident().
  *
  * Example: Calling a function defined in a GModule
- * |[
+ * |[<!-- language="C" --> 
  * /&ast; the function signature for 'say_hello' &ast;/
  * typedef void (* SayHelloFunc) (const char *message);
  *
diff --git a/gobject/gbinding.c b/gobject/gbinding.c
index 8cf3752..0269d57 100644
--- a/gobject/gbinding.c
+++ b/gobject/gbinding.c
@@ -29,7 +29,7 @@
  * value is applied to the target property; for instance, the following
  * binding:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   g_object_bind_property (object1, "property-a",
  *                           object2, "property-b",
  *                           G_BINDING_DEFAULT);
@@ -43,7 +43,7 @@
  * of two #GObject instances, so that if either property changes, the
  * other is updated as well, for instance:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   g_object_bind_property (object1, "property-a",
  *                           object2, "property-b",
  *                           G_BINDING_BIDIRECTIONAL);
@@ -56,7 +56,7 @@
  * transformation from the source value to the target value before
  * applying it; for instance, the following binding:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   g_object_bind_property_full (adjustment1, "value",
  *                                adjustment2, "value",
  *                                G_BINDING_BIDIRECTIONAL,
diff --git a/gobject/gclosure.c b/gobject/gclosure.c
index 18366d4..bd58939 100644
--- a/gobject/gclosure.c
+++ b/gobject/gclosure.c
@@ -151,7 +151,7 @@ enum {
  * part as a #GClosure. This function is mainly useful when
  * implementing new types of closures.
  *
- * |[
+ * |[<!-- language="C" --> 
  * typedef struct _MyClosure MyClosure;
  * struct _MyClosure
  * {
@@ -608,20 +608,20 @@ g_closure_unref (GClosure *closure)
  * count. If the closure is not floating, g_closure_sink() does
  * nothing. The reason for the existence of the floating state is to
  * prevent cumbersome code sequences like:
- * |[
+ * |[<!-- language="C" --> 
  * closure = g_cclosure_new (cb_func, cb_data);
  * g_source_set_closure (source, closure);
  * g_closure_unref (closure); /&ast; GObject doesn't really need this &ast;/
  * ]|
  * Because g_source_set_closure() (and similar functions) take ownership of the
  * initial reference count, if it is unowned, we instead can write:
- * |[
+ * |[<!-- language="C" --> 
  * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
  * ]|
  *
  * Generally, this function is used together with g_closure_ref(). Ane example
  * of storing a closure for later notification looks like:
- * |[
+ * |[<!-- language="C" --> 
  * static GClosure *notify_closure = NULL;
  * void
  * foo_notify_set_closure (GClosure *closure)
diff --git a/gobject/genums.c b/gobject/genums.c
index 25c0708..c1fe35d 100644
--- a/gobject/genums.c
+++ b/gobject/genums.c
@@ -262,7 +262,7 @@ g_flags_register_static (const gchar           *name,
  * function of a #GTypePlugin implementation, as in the following
  * example:
  *
- * |[
+ * |[<!-- language="C" --> 
  * static void
  * my_enum_complete_type_info (GTypePlugin     *plugin,
  *                             GType            g_type,
diff --git a/gobject/gobject.c b/gobject/gobject.c
index c80da16..1da6979 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -53,7 +53,7 @@
  * 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:
- * |[
+ * |[<!-- language="C" --> 
  * container = create_container ();
  * container_add_child (container, create_child());
  * ]|
@@ -62,7 +62,7 @@
  * references, container_add_child() can only g_object_ref() the new child,
  * so to implement this code without reference leaks, it would have to be
  * written as:
- * |[
+ * |[<!-- language="C" --> 
  * Child *child;
  * container = create_container ();
  * child = create_child ();
@@ -84,7 +84,7 @@
  * across certain code portions (an example is #GtkMenu), to achieve this,
  * the following sequence can be used:
  *
- * |[
+ * |[<!-- language="C" --> 
  * /&ast; save floating state &ast;/
  * gboolean was_floating = g_object_is_floating (object);
  * g_object_ref_sink (object);
@@ -473,7 +473,7 @@ g_object_do_class_init (GObjectClass *class)
    * This signal is typically used to obtain change notification for a
    * single property, by specifying the property name as a detail in the
    * g_signal_connect() call, like this:
-   * |[
+   * |[<!-- language="C" --> 
    * g_signal_connect (text_view->buffer, "notify::paste-target-list",
    *                   G_CALLBACK (gtk_text_view_target_list_notify),
    *                   text_view)
@@ -589,7 +589,7 @@ g_object_class_install_property (GObjectClass *class,
  * #GParamSpecs and g_object_notify_by_pspec(). For instance, this
  * class initialization:
  *
- * |[
+ * |[<!-- language="C" --> 
  * enum {
  *   PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
  * };
@@ -622,7 +622,7 @@ g_object_class_install_property (GObjectClass *class,
  *
  * allows calling g_object_notify_by_pspec() to notify of property changes:
  *
- * |[
+ * |[<!-- language="C" --> 
  * void
  * my_object_set_foo (MyObject *self, gint foo)
  * {
@@ -1209,7 +1209,7 @@ g_object_notify (GObject     *object,
  * instead, is to store the GParamSpec used with
  * g_object_class_install_property() inside a static array, e.g.:
  *
- *|[
+ *|[<!-- language="C" --> 
  *   enum
  *   {
  *     PROP_0,
@@ -1234,7 +1234,7 @@ g_object_notify (GObject     *object,
  *
  * and then notify a change on the "foo" property with:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   g_object_notify_by_pspec (self, properties[PROP_FOO]);
  * ]|
  *
@@ -2229,7 +2229,7 @@ g_object_set (gpointer     _object,
  *
  * Here is an example of using g_object_get() to get the contents
  * of three properties: an integer, a string and an object:
- * |[
+ * |[<!-- language="C" --> 
  *  gint intval;
  *  gchar *strval;
  *  GObject *objval;
@@ -2408,7 +2408,7 @@ g_object_get_property (GObject       *object,
  * - swapped_signal_after, swapped-signal-after: equivalent to g_signal_connect_data (..., NULL, 
G_CONNECT_SWAPPED | G_CONNECT_AFTER)
  * - swapped_object_signal_after, swapped-object-signal-after: equivalent to g_signal_connect_object (..., 
G_CONNECT_SWAPPED | G_CONNECT_AFTER)
  *
- * |[
+ * |[<!-- language="C" --> 
  *   menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
  *                                                "type", GTK_WINDOW_POPUP,
  *                                                "child", menu,
@@ -3324,7 +3324,7 @@ g_object_set_qdata_full (GObject       *object,
  * set).
  * Usually, calling this function is only required to update
  * user data pointers with a destroy notifier, for example:
- * |[
+ * |[<!-- language="C" --> 
  * void
  * object_add_to_user_list (GObject     *object,
  *                          const gchar *new_string)
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 1df9cc5..2909f8a 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -4425,7 +4425,7 @@ gobject_init_ctor (void)
  * Note the use of a structure member "priv" to avoid the overhead
  * of repeatedly calling MY_OBJECT_GET_PRIVATE().
  *
- * |[
+ * |[<!-- language="C" --> 
  * typedef struct _MyObject        MyObject;
  * typedef struct _MyObjectPrivate MyObjectPrivate;
  *
diff --git a/gobject/gtypeplugin.c b/gobject/gtypeplugin.c
index c29258c..bb4d01d 100644
--- a/gobject/gtypeplugin.c
+++ b/gobject/gtypeplugin.c
@@ -33,7 +33,7 @@
  * 1. The type is initially introduced (usually upon loading the module
  *    the first time, or by your main application that knows what modules
  *    introduces what types), like this:
- *    |[
+ *    |[<!-- language="C" --> 
  *    new_type_id = g_type_register_dynamic (parent_type_id,
  *                                           "TypeName",
  *                                           new_type_plugin,
diff --git a/gobject/gvalue.c b/gobject/gvalue.c
index 30ef91d..a47ed99 100644
--- a/gobject/gvalue.c
+++ b/gobject/gvalue.c
@@ -55,7 +55,7 @@
  * The code in the example program below demonstrates #GValue's
  * features.
  *
- * |[
+ * |[<!-- language="C" --> 
  * #include <glib-object.h>
  *
  * static void
diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c
index 2b8d7f2..2ab8436 100644
--- a/gobject/gvaluearray.c
+++ b/gobject/gvaluearray.c
@@ -45,13 +45,13 @@
  * g_value_unset() as the clear function using g_array_set_clear_func(),
  * for instance, the following code:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   GValueArray *array = g_value_array_new (10);
  * ]|
  *
  * can be replaced by:
  *
- * |[
+ * |[<!-- language="C" --> 
  *   GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
  *   g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
  * ]|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]