[nautilus/gnome-3-26] file: Add autoptr support



commit b109d6307534136c61d174a3b6ed55357ce0e0e3
Author: Alexandru Fazakas <alex fazakas97 yahoo com>
Date:   Tue Feb 20 22:12:25 2018 +0100

    file: Add autoptr support
    
    This is further used for the deep freeing as part of g_autolist().
    
    Related to https://gitlab.gnome.org/GNOME/nautilus/issues/226

 src/nautilus-file.h | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/nautilus-file.h b/src/nautilus-file.h
index 3a83bd4de..5b319f9c9 100644
--- a/src/nautilus-file.h
+++ b/src/nautilus-file.h
@@ -149,6 +149,8 @@ NautilusFile *          nautilus_file_get_existing_by_uri               (const c
 NautilusFile *          nautilus_file_ref                               (NautilusFile                   
*file);
 void                    nautilus_file_unref                             (NautilusFile                   
*file);
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (NautilusFile, nautilus_file_unref)
+
 /* Monitor the file. */
 void                    nautilus_file_monitor_add                       (NautilusFile                   
*file,
                                                                         gconstpointer                   
client,


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