summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-12-17 20:51:37 -0500
committerColin Walters <walters@verbum.org>2014-12-17 20:52:18 -0500
commit012bdf72eceda33d430284161231884c348c8081 (patch)
treeed6081fb29f0e6f55bbc5a611a7c50d582fa5d35
parentbb4694dcb8b548200bc28ae7efd7181bd7ee3aff (diff)
downloadlibgsystem-012bdf72eceda33d430284161231884c348c8081.tar.gz
localalloc: Define a #define for gs_unref_keyfile
This got missed before.
-rw-r--r--src/gsystem-local-alloc.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gsystem-local-alloc.h b/src/gsystem-local-alloc.h
index d217f29..71f444b 100644
--- a/src/gsystem-local-alloc.h
+++ b/src/gsystem-local-alloc.h
@@ -43,7 +43,6 @@ G_BEGIN_DECLS
* 1) Take a pointer to the location (typically itself a pointer).
* 2) Provide %NULL-safety where it doesn't exist already (e.g. g_object_unref)
*/
-GS_DEFINE_CLEANUP_FUNCTION0(GKeyFile*, gs_local_keyfile_unref, g_key_file_unref)
/**
* gs_free:
@@ -177,6 +176,14 @@ GS_DEFINE_CLEANUP_FUNCTION(char**, gs_local_strfreev, g_strfreev)
#define gs_free_error __attribute__ ((cleanup(gs_local_free_error)))
GS_DEFINE_CLEANUP_FUNCTION0(GError*, gs_local_free_error, g_error_free)
+/**
+ * gs_unref_keyfile:
+ *
+ * Call g_key_file_unref() on a variable location when it goes out of scope.
+ */
+#define gs_unref_keyfile __attribute__ ((cleanup(gs_local_keyfile_unref)))
+GS_DEFINE_CLEANUP_FUNCTION0(GKeyFile*, gs_local_keyfile_unref, g_key_file_unref)
+
G_END_DECLS
#endif