X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgdbusintrospection.c;h=6d3ff93ead7224c5e4477e3a0cfc3cea1e132baa;hb=d9ad40b4eaf1a9197ab363de4346a8d84f45f5c1;hp=c5f80ec36d9fb90f9497872a8eaecd49fcb6c414;hpb=9933a9f90477bf960f7f9c357253d1e4c78e5db5;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gdbusintrospection.c b/gio/gdbusintrospection.c index c5f80ec..6d3ff93 100644 --- a/gio/gdbusintrospection.c +++ b/gio/gdbusintrospection.c @@ -13,9 +13,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Author: David Zeuthen */ @@ -40,7 +38,7 @@ * used when registering objects with g_dbus_connection_register_object(). * * The format of D-Bus introspection XML is specified in the - * D-Bus specification. + * [D-Bus specification](http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format) */ /* ---------------------------------------------------------------------------------------------------- */ @@ -583,12 +581,15 @@ g_dbus_annotation_info_generate_xml (GDBusAnnotationInfo *info, guint indent, GString *string_builder) { + gchar *tmp; guint n; - g_string_append_printf (string_builder, "%*skey, - info->value); + tmp = g_markup_printf_escaped ("%*skey, + info->value); + g_string_append (string_builder, tmp); + g_free (tmp); if (info->annotations == NULL) { @@ -779,7 +780,7 @@ g_dbus_property_info_generate_xml (GDBusPropertyInfo *info, * * This function is typically used for generating introspection XML * documents at run-time for handling the - * org.freedesktop.DBus.Introspectable.Introspect + * `org.freedesktop.DBus.Introspectable.Introspect` * method. * * Since: 2.26 @@ -827,7 +828,7 @@ g_dbus_interface_info_generate_xml (GDBusInterfaceInfo *info, * Appends an XML representation of @info (and its children) to @string_builder. * * This function is typically used for generating introspection XML documents at run-time for - * handling the org.freedesktop.DBus.Introspectable.Introspect method. + * handling the `org.freedesktop.DBus.Introspectable.Introspect` method. * * Since: 2.26 */ @@ -1756,10 +1757,10 @@ parser_error (GMarkupParseContext *context, * Parses @xml_data and returns a #GDBusNodeInfo representing the data. * * The introspection XML must contain exactly one top-level - * node element. + * element. * * Note that this routine is using a - * GMarkup-based + * [GMarkup][glib-Simple-XML-Subset-Parser.description]-based * parser that only accepts a subset of valid XML documents. * * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free @@ -1826,8 +1827,7 @@ g_dbus_node_info_new_for_xml (const gchar *xml_data, g_free (ughret); out: - if (parser != NULL) - g_free (parser); + g_free (parser); if (context != NULL) g_markup_parse_context_free (context);