diff options
author | Richard Hughes <richard@hughsie.com> | 2015-08-03 12:49:04 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-08-03 12:49:04 +0100 |
commit | 2f715d9c7612473e4f7cbea843e3b3079df8bb3e (patch) | |
tree | b41d1f96dd39d0ab96f9941476dacac3a512c5df /libappstream-glib/as-bundle.c | |
parent | 6ad012a9fa6f02e7da85fb9bb9155920149b8465 (diff) | |
download | appstream-glib-2f715d9c7612473e4f7cbea843e3b3079df8bb3e.tar.gz |
Drop the unused _len arguments on many functions
Using the length of -1 for 'unknown' breaks the GIR-generated bindings.
This breaks API and ABI and the soname has been updated to reflect this.
Diffstat (limited to 'libappstream-glib/as-bundle.c')
-rw-r--r-- | libappstream-glib/as-bundle.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libappstream-glib/as-bundle.c b/libappstream-glib/as-bundle.c index fd1e69c..4a02975 100644 --- a/libappstream-glib/as-bundle.c +++ b/libappstream-glib/as-bundle.c @@ -162,18 +162,17 @@ as_bundle_get_kind (AsBundle *bundle) * as_bundle_set_id: * @bundle: a #AsBundle instance. * @id: the URL. - * @id_len: the size of @id, or -1 if %NULL-terminated. * * Sets the ID for this bundle. * * Since: 0.3.5 **/ void -as_bundle_set_id (AsBundle *bundle, const gchar *id, gssize id_len) +as_bundle_set_id (AsBundle *bundle, const gchar *id) { AsBundlePrivate *priv = GET_PRIVATE (bundle); g_free (priv->id); - priv->id = as_strndup (id, id_len); + priv->id = g_strdup (id); } /** @@ -271,7 +270,7 @@ as_bundle_node_parse_dep11 (AsBundle *im, GNode *node, for (n = node->children; n != NULL; n = n->next) { tmp = as_yaml_node_get_key (n); if (g_strcmp0 (tmp, "id") == 0) - as_bundle_set_id (im, as_yaml_node_get_value (n), -1); + as_bundle_set_id (im, as_yaml_node_get_value (n)); } return TRUE; } |