[libgovirt] proxy: Fix invalid (transfer none) annotations



commit 2922c259093c4c20f115744f5ce02c4c71c5f4c8
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Fri Jul 24 14:07:51 2015 +0200

    proxy: Fix invalid (transfer none) annotations
    
    ovirt_proxy_fetch_vms_finish() and ovirt_proxy_get_vms() returns
    the list of values from a GHashTable which they got using
    g_hash_table_get_values(). The returned GList must be g_list_free'd
    after use, ie it's (transfer container). The annotation on these 2
    methods is thus wrong. I've checked that it has been wrong since at
    least 0.0.1 (very first release, and there has been ABI breaks in
    between), so the annotation change should not cause ABI breakage.

 govirt/ovirt-proxy-deprecated.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/govirt/ovirt-proxy-deprecated.c b/govirt/ovirt-proxy-deprecated.c
index 1653baa..0e8f9a0 100644
--- a/govirt/ovirt-proxy-deprecated.c
+++ b/govirt/ovirt-proxy-deprecated.c
@@ -113,10 +113,10 @@ void ovirt_proxy_fetch_vms_async(OvirtProxy *proxy,
  * @proxy: a #OvirtProxy
  * @result: (transfer none): async method result
  *
- * Return value: (transfer none) (element-type OvirtVm): the list of
- * #OvirtVm associated with #OvirtProxy. The returned list should not be
- * freed nor modified, and can become invalid any time a #OvirtProxy call
- * completes.
+ * Return value: (transfer container) (element-type OvirtVm): the list of
+ * #OvirtVm associated with #OvirtProxy.
+ * The returned list should be freed with g_list_free(), and can become
+ * invalid any time a #OvirtProxy call completes.
  */
 GList *
 ovirt_proxy_fetch_vms_finish(OvirtProxy *proxy,
@@ -179,9 +179,9 @@ OvirtVm *ovirt_proxy_lookup_vm(OvirtProxy *proxy, const char *vm_name)
  * must have been fetched with ovirt_proxy_fetch_vms() or
  * ovirt_proxy_fetch_vms_async() before calling this function.
  *
- * Return value: (transfer none) (element-type OvirtVm): the list of
+ * Return value: (transfer container) (element-type OvirtVm): the list of
  * #OvirtVm associated with #OvirtProxy.
- * The returned list should not be freed nor modified, and can become
+ * The returned list should be freed with g_list_free(), and can become
  * invalid any time a #OvirtProxy call completes.
  */
 GList *ovirt_proxy_get_vms(OvirtProxy *proxy)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]