[file-roller/wip/jtojnar/gobject-modernization] archive: Register autocleanup function



commit 2cbfc0cd29134ba39ae33af0d5dc36300d54fbd0
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Aug 5 21:23:20 2022 +0200

    archive: Register autocleanup function
    
    Required for FrArchiveLibarchive subclass to be declarable with G_DECLARE_* macros.
    Ideally, we would use G_DECLARE_DERIVABLE_TYPE here as well but that is not compatible with public 
structs.

 src/fr-archive.h | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/fr-archive.h b/src/fr-archive.h
index f3f79562..ec515be5 100644
--- a/src/fr-archive.h
+++ b/src/fr-archive.h
@@ -65,6 +65,8 @@ typedef struct _FrArchive         FrArchive;
 typedef struct _FrArchiveClass    FrArchiveClass;
 typedef struct _FrArchivePrivate  FrArchivePrivate;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (FrArchive, g_object_unref)
+
 typedef gboolean (*FakeLoadFunc) (FrArchive *archive, gpointer data);
 
 struct _FrArchive {


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