Fix printf-tests on W32 by ifdefing the expected output
[platform/upstream/glib.git] / glib / gvariant.c
index 2e98443..aca9579 100644 (file)
  * padding bytes.  That makes a total of 6 + 2 + 3 = 11 bytes.
  *
  * We now require extra padding between the two items in the array.
- * After the 14 bytes of the first item, that's 2 bytes required. We
- * now require 2 framing offsets for an extra two bytes.  14 + 2 + 11
- * + 2 = 29 bytes to encode the entire two-item dictionary.
+ * After the 14 bytes of the first item, that's 2 bytes required.
+ * We now require 2 framing offsets for an extra two
+ * bytes. 14 + 2 + 11 + 2 = 29 bytes to encode the entire two-item
+ * dictionary.
  *
  * ## Type Information Cache
  *
@@ -2762,9 +2763,9 @@ g_variant_equal (gconstpointer one,
  * If you only require an equality comparison, g_variant_equal() is more
  * general.
  *
- * Returns: negative value if a < b;
+ * Returns: negative value if a < b;
  *          zero if a = b;
- *          positive value if a &gt; b.
+ *          positive value if a > b.
  *
  * Since: 2.26
  **/
@@ -3031,7 +3032,7 @@ g_variant_iter_free (GVariantIter *iter)
  *
  * Here is an example for iterating with g_variant_iter_next_value():
  * |[<!-- language="C" --> 
- *   /&ast; recursively iterate a container &ast;/
+ *   // recursively iterate a container
  *   void
  *   iterate_container_recursive (GVariant *container)
  *   {
@@ -3624,7 +3625,7 @@ g_variant_builder_end (GVariantBuilder *builder)
 /* GVariantDict {{{1 */
 
 /**
- * GVariantDict: (skip)
+ * GVariantDict:
  *
  * #GVariantDict is a mutable interface to #GVariant dictionaries.
  *
@@ -3664,7 +3665,7 @@ g_variant_builder_end (GVariantBuilder *builder)
  *
  * ## Using a stack-allocated GVariantDict
  *
- * |[
+ * |[<!-- language="C" -->
  *   GVariant *
  *   add_to_count (GVariant  *orig,
  *                 GError   **error)
@@ -3672,23 +3673,23 @@ g_variant_builder_end (GVariantBuilder *builder)
  *     GVariantDict dict;
  *     guint32 count;
  *
- *     g_variant_dict_init (&amp;dict, orig);
- *     if (!g_variant_dict_lookup (&amp;dict, "count", "u", &amp;count))
+ *     g_variant_dict_init (&dict, orig);
+ *     if (!g_variant_dict_lookup (&dict, "count", "u", &count))
  *       {
  *         g_set_error (...);
- *         g_variant_dict_clear (&amp;dict);
+ *         g_variant_dict_clear (&dict);
  *         return NULL;
  *       }
  *
- *     g_variant_dict_insert (&amp;dict, "count", "u", count + 1);
+ *     g_variant_dict_insert (&dict, "count", "u", count + 1);
  *
- *     return g_variant_dict_end (&amp;dict);
+ *     return g_variant_dict_end (&dict);
  *   }
  * ]|
  *
  * ## Using heap-allocated GVariantDict
  *
- * |[
+ * |[<!-- language="C" -->
  *   GVariant *
  *   add_to_count (GVariant  *orig,
  *                 GError   **error)
@@ -3699,7 +3700,7 @@ g_variant_builder_end (GVariantBuilder *builder)
  *
  *     dict = g_variant_dict_new (orig);
  *
- *     if (g_variant_dict_lookup (dict, "count", "u", &amp;count))
+ *     if (g_variant_dict_lookup (dict, "count", "u", &count))
  *       {
  *         g_variant_dict_insert (dict, "count", "u", count + 1);
  *         result = g_variant_dict_end (dict);
@@ -5157,7 +5158,7 @@ g_variant_valist_get (const gchar **str,
  * specified in @format_string. This can be achieved by casting them. See
  * the [GVariant varargs documentation][gvariant-varargs].
  *
- * <programlisting>
+ * |[<!-- language="C" -->
  * MyFlags some_flags = FLAG_ONE | FLAG_TWO;
  * const gchar *some_strings[] = { "a", "b", "c", NULL };
  * GVariant *new_variant;
@@ -5166,7 +5167,7 @@ g_variant_valist_get (const gchar **str,
  *                              /<!-- -->* This cast is required. *<!-- -->/
  *                              (guint64) some_flags,
  *                              some_strings);
- * </programlisting>
+ * ]|
  *
  * Returns: a new floating #GVariant instance
  *
@@ -5468,7 +5469,7 @@ g_variant_get_child (GVariant    *value,
  *
  * Here is an example for memory management with g_variant_iter_next():
  * |[<!-- language="C" --> 
- *   /&ast; Iterates a dictionary of type 'a{sv}' &ast;/
+ *   // Iterates a dictionary of type 'a{sv}'
  *   void
  *   iterate_dictionary (GVariant *dictionary)
  *   {
@@ -5482,7 +5483,7 @@ g_variant_get_child (GVariant    *value,
  *         g_print ("Item '%s' has type '%s'\n", key,
  *                  g_variant_get_type_string (value));
  *
- *         /&ast; must free data for ourselves &ast;/
+ *         // must free data for ourselves
  *         g_variant_unref (value);
  *         g_free (key);
  *       }
@@ -5560,7 +5561,7 @@ g_variant_iter_next (GVariantIter *iter,
  *
  * Here is an example for memory management with g_variant_iter_loop():
  * |[<!-- language="C" --> 
- *   /&ast; Iterates a dictionary of type 'a{sv}' &ast;/
+ *   // Iterates a dictionary of type 'a{sv}'
  *   void
  *   iterate_dictionary (GVariant *dictionary)
  *   {
@@ -5574,9 +5575,8 @@ g_variant_iter_next (GVariantIter *iter,
  *         g_print ("Item '%s' has type '%s'\n", key,
  *                  g_variant_get_type_string (value));
  *
- *         /&ast; no need to free 'key' and 'value' here
- *          &ast; unless breaking out of this loop
- *          &ast;/
+ *         // no need to free 'key' and 'value' here
+ *         // unless breaking out of this loop
  *       }
  *   }
  * ]|