[libglnx] Backport more autocleanup types from GLib
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libglnx] Backport more autocleanup types from GLib
- Date: Mon, 4 May 2015 15:58:27 +0000 (UTC)
commit dfe77be2d558373c4b01189e2048d79be9c9c453
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon May 4 11:57:11 2015 -0400
Backport more autocleanup types from GLib
GStrv, GFile, GOutputStream
glnx-backport-autocleanups.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/glnx-backport-autocleanups.h b/glnx-backport-autocleanups.h
index daa89a9..f616039 100644
--- a/glnx-backport-autocleanups.h
+++ b/glnx-backport-autocleanups.h
@@ -64,6 +64,7 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GScanner, g_scanner_destroy)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSequence, g_sequence_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSList, g_slist_free)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GStringChunk, g_string_chunk_free)
+G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GThread, g_thread_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GMutex, g_mutex_clear)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GCond, g_cond_clear)
@@ -78,4 +79,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantDict, g_variant_dict_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantDict, g_variant_dict_clear)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantType, g_variant_type_free)
+/* Add GObject-based types add needed. */
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFile, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GOutputStream, g_object_unref)
+
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]