[gcab] trivial: Add cleanup functions for the three defined objects
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab] trivial: Add cleanup functions for the three defined objects
- Date: Thu, 14 Dec 2017 13:35:21 +0000 (UTC)
commit 065317213d481f16de2ac086843f1ec7d71df98d
Author: Richard Hughes <richard hughsie com>
Date: Tue Dec 12 15:26:18 2017 +0000
trivial: Add cleanup functions for the three defined objects
configure.ac | 2 +-
libgcab/gcab-cabinet.h | 2 ++
libgcab/gcab-file.h | 2 ++
libgcab/gcab-folder.h | 2 ++
meson.build | 2 +-
5 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 4e88463..f068175 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The name of the gettext domain])
AM_GLIB_GNU_GETTEXT
-AM_PATH_GLIB_2_0([2.32.0], [], [AC_MSG_ERROR([glib required])], [gio])
+AM_PATH_GLIB_2_0([2.44.0], [], [AC_MSG_ERROR([glib required])], [gio])
AM_PROG_VALAC([0.14])
AC_PATH_PROG(VAPIGEN, vapigen, no)
AC_SUBST(VAPIGEN)
diff --git a/libgcab/gcab-cabinet.h b/libgcab/gcab-cabinet.h
index 70351c6..e63763f 100644
--- a/libgcab/gcab-cabinet.h
+++ b/libgcab/gcab-cabinet.h
@@ -110,6 +110,8 @@ const GByteArray * gcab_cabinet_get_signature (GCabCabinet *cabinet,
GCancellable *cancellable,
GError **error);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCabCabinet, g_object_unref)
+
G_END_DECLS
#endif /* _GCAB_CABINET_H_ */
diff --git a/libgcab/gcab-file.h b/libgcab/gcab-file.h
index 2cd619b..b7579f4 100644
--- a/libgcab/gcab-file.h
+++ b/libgcab/gcab-file.h
@@ -84,6 +84,8 @@ void gcab_file_get_date (GCabFile *file, GTimeVal *r
const gchar * gcab_file_get_extract_name (GCabFile *file);
void gcab_file_set_extract_name (GCabFile *file, const gchar *name);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCabFile, g_object_unref)
+
G_END_DECLS
#endif /* _GCAB_FILE_H_ */
diff --git a/libgcab/gcab-folder.h b/libgcab/gcab-folder.h
index d68a10f..f858686 100644
--- a/libgcab/gcab-folder.h
+++ b/libgcab/gcab-folder.h
@@ -74,6 +74,8 @@ gboolean gcab_folder_add_file (GCabFolder *cabfolder,
guint gcab_folder_get_nfiles (GCabFolder *cabfolder);
GSList * gcab_folder_get_files (GCabFolder *cabfolder);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GCabFolder, g_object_unref)
+
G_END_DECLS
#endif /* _GCAB_FILE_H_ */
diff --git a/meson.build b/meson.build
index 1d669f1..3493ad6 100644
--- a/meson.build
+++ b/meson.build
@@ -84,7 +84,7 @@ add_global_link_arguments(
language: 'c'
)
-gio = dependency('gio-2.0', version : '>= 2.32.0')
+gio = dependency('gio-2.0', version : '>= 2.44.0')
libz = dependency('zlib')
gnome = import('gnome')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]