[evolution-data-server/tintou/camel-store-info-annotations] M!92 - CamelStoreSummary: Fix ref/unref annotations




commit ed7c3bcd541a267af645a950a84c7790c3f20629
Author: Corentin Noël <corentin noel collabora com>
Date:   Tue Feb 15 11:29:11 2022 +0100

    M!92 - CamelStoreSummary: Fix ref/unref annotations
    
    Allows the bindings to actually use CamelStoreInfo without leaking memory or
    getting hit by double-free errors.
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/92

 src/camel/camel-store-summary.c | 7 ++++---
 src/vala/Camel-1.2.metadata     | 2 ++
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/camel-store-summary.c b/src/camel/camel-store-summary.c
index b5db33622..98115f0e6 100644
--- a/src/camel/camel-store-summary.c
+++ b/src/camel/camel-store-summary.c
@@ -371,7 +371,8 @@ camel_store_summary_array (CamelStoreSummary *summary)
 /**
  * camel_store_summary_array_free:
  * @summary: a #CamelStoreSummary object
- * @array: (element-type CamelStoreInfo): the summary array as gotten from camel_store_summary_array()
+ * @array: (element-type CamelStoreInfo) (transfer full): the summary array as gotten from
+ * camel_store_summary_array()
  *
  * Free the folder summary array.
  **/
@@ -674,7 +675,7 @@ camel_store_summary_info_ref (CamelStoreSummary *summary,
 /**
  * camel_store_summary_info_unref:
  * @summary: a #CamelStoreSummary object
- * @info: a #CamelStoreInfo
+ * @info: (transfer full): a #CamelStoreInfo
  *
  * Unref and potentially free @info, and all associated memory.
  **/
@@ -773,7 +774,7 @@ camel_store_summary_remove_path (CamelStoreSummary *summary,
  * Allocate a new #CamelStoreInfo, suitable for adding to this
  * summary.
  *
- * Returns: the newly allocated #CamelStoreInfo
+ * Returns: (transfer full): the newly allocated #CamelStoreInfo
  **/
 CamelStoreInfo *
 camel_store_summary_info_new (CamelStoreSummary *summary)
diff --git a/src/vala/Camel-1.2.metadata b/src/vala/Camel-1.2.metadata
index 6937274fe..3f9063bd5 100644
--- a/src/vala/Camel-1.2.metadata
+++ b/src/vala/Camel-1.2.metadata
@@ -139,6 +139,8 @@ CertDB.header_load.istream type="GLib.FileStream"
 CertDB.header_save.ostream type="GLib.FileStream"
 FilterDriver.set_logfile.logfile type="GLib.FileStream"
 
+StoreSummary.store_info_free.info owned
+
 FolderSummary.prepare_fetch_all#virtual_method name="prepare_fetch_all_v"
 
 VeeStore.get_unmatched_folder type="unowned Camel.VeeFolder"


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