[tracker/wip/carlosg/writeback-refactor: 2/2] libtracker-sparql: Fix introspection annotation and docs for API call
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/writeback-refactor: 2/2] libtracker-sparql: Fix introspection annotation and docs for API call
- Date: Wed, 20 May 2020 21:21:54 +0000 (UTC)
commit 64c2e2ae9503ee25132139dbcd4c8edd80ac5280
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed May 20 23:15:42 2020 +0200
libtracker-sparql: Fix introspection annotation and docs for API call
The tracker_resource_list_values() function was announced as returning
a full copy of a GList of GValues. Instead it's only transferring the
list, whereas the GValue is owned by the TrackerResource.
This is maybe a leak of internal details, but it's better than fixing
the code to work like docs say, since GValues don't have a free function
(and it's completely unclear if one should g_free or g_slice_free it).
Another alternative might be returning a GArray with a destroy notify,
but it's not worth the porting effort. Simply fix the docs, and document
the list as "tranfer container"
src/libtracker-sparql/tracker-resource.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-resource.c b/src/libtracker-sparql/tracker-resource.c
index efa71273b..f7d75996f 100644
--- a/src/libtracker-sparql/tracker-resource.c
+++ b/src/libtracker-sparql/tracker-resource.c
@@ -692,8 +692,8 @@ ADD_PROPERTY_FOR_GTYPE (tracker_resource_add_uri, const char *, TRACKER_TYPE_URI
*
* Returns the list of all known values of the given property.
*
- * Returns: (transfer full) (element-type GValue): a #GList of #GValue
- * instances, which must be freed by the caller.
+ * Returns: (transfer container) (element-type GValue): a #GList of #GValue
+ * instances. The list should be freed with g_list_free()
*
* Since: 1.10
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]