summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-image.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-08-03 12:49:04 +0100
committerRichard Hughes <richard@hughsie.com>2015-08-03 12:49:04 +0100
commit2f715d9c7612473e4f7cbea843e3b3079df8bb3e (patch)
treeb41d1f96dd39d0ab96f9941476dacac3a512c5df /libappstream-glib/as-image.c
parent6ad012a9fa6f02e7da85fb9bb9155920149b8465 (diff)
downloadappstream-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-image.c')
-rw-r--r--libappstream-glib/as-image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libappstream-glib/as-image.c b/libappstream-glib/as-image.c
index 401b5f5..89ca8db 100644
--- a/libappstream-glib/as-image.c
+++ b/libappstream-glib/as-image.c
@@ -256,18 +256,17 @@ as_image_get_pixbuf (AsImage *image)
* as_image_set_url:
* @image: a #AsImage instance.
* @url: the URL.
- * @url_len: the size of @url, or -1 if %NULL-terminated.
*
* Sets the fully-qualified mirror URL to use for the image.
*
* Since: 0.1.0
**/
void
-as_image_set_url (AsImage *image, const gchar *url, gssize url_len)
+as_image_set_url (AsImage *image, const gchar *url)
{
AsImagePrivate *priv = GET_PRIVATE (image);
g_free (priv->url);
- priv->url = as_strndup (url, url_len);
+ priv->url = g_strdup (url);
}
/**
@@ -473,7 +472,7 @@ as_image_node_parse_dep11 (AsImage *im, GNode *node,
else if (g_strcmp0 (tmp, "width") == 0)
as_image_set_width (im, as_yaml_node_get_value_as_int (n));
else if (g_strcmp0 (tmp, "url") == 0)
- as_image_set_url (im, as_yaml_node_get_value (n), -1);
+ as_image_set_url (im, as_yaml_node_get_value (n));
}
return TRUE;
}
@@ -806,3 +805,4 @@ as_image_new (void)
image = g_object_new (AS_TYPE_IMAGE, NULL);
return AS_IMAGE (image);
}
+