diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c index dc655ce48..de140d0a5 100644 --- a/glib/gvariant-parser.c +++ b/glib/gvariant-parser.c @@ -2521,23 +2521,23 @@ g_variant_new_parsed (const gchar *format, * * This function might be used as follows: * - * + * |[ * GVariant * * make_pointless_dictionary (void) * { - * GVariantBuilder *builder; + * GVariantBuilder builder; * int i; * - * builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY); - * g_variant_builder_add_parsed (builder, "{'width', <%i>}", 600); - * g_variant_builder_add_parsed (builder, "{'title', <%s>}", "foo"); - * g_variant_builder_add_parsed (builder, "{'transparency', <0.5>}"); - * return g_variant_builder_end (builder); + * g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY); + * g_variant_builder_add_parsed (&builder, "{'width', <%i>}", 600); + * g_variant_builder_add_parsed (&builder, "{'title', <%s>}", "foo"); + * g_variant_builder_add_parsed (&builder, "{'transparency', <0.5>}"); + * return g_variant_builder_end (&builder); * } - * + * ]| * * Since: 2.26 - **/ + */ void g_variant_builder_add_parsed (GVariantBuilder *builder, const gchar *format, diff --git a/glib/gvariant.c b/glib/gvariant.c index 3b3f7dfe5..0e028677a 100644 --- a/glib/gvariant.c +++ b/glib/gvariant.c @@ -4884,7 +4884,7 @@ g_variant_get_va (GVariant *value, /* Varargs-enabled Utility Functions {{{1 */ /** - * g_variant_builder_add: (skp) + * g_variant_builder_add: (skip) * @builder: a #GVariantBuilder * @format_string: a #GVariant varargs format string * @...: arguments, as per @format_string @@ -4896,28 +4896,28 @@ g_variant_get_va (GVariant *value, * * This function might be used as follows: * - * + * |[ * GVariant * * make_pointless_dictionary (void) * { - * GVariantBuilder *builder; + * GVariantBuilder builder; * int i; * - * builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY); + * g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY); * for (i = 0; i < 16; i++) * { * gchar buf[3]; * * sprintf (buf, "%d", i); - * g_variant_builder_add (builder, "{is}", i, buf); + * g_variant_builder_add (&builder, "{is}", i, buf); * } * - * return g_variant_builder_end (builder); + * return g_variant_builder_end (&builder); * } - * + * ]| * * Since: 2.24 - **/ + */ void g_variant_builder_add (GVariantBuilder *builder, const gchar *format_string,