[dconf: 2/9] service: Add some initial g_autoptr() support
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf: 2/9] service: Add some initial g_autoptr() support
- Date: Tue, 21 Aug 2018 15:42:38 +0000 (UTC)
commit f7d75e922ef19eb5108ab19e1f030794fe767eaa
Author: Philip Withnall <withnall endlessm com>
Date: Mon Aug 13 15:00:30 2018 +0100
service: Add some initial g_autoptr() support
This doesn’t bump our GLib dependency, since we already depend on GLib
2.44.
Signed-off-by: Philip Withnall <withnall endlessm com>
service/dconf-writer.h | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/service/dconf-writer.h b/service/dconf-writer.h
index a41f115..17360c9 100644
--- a/service/dconf-writer.h
+++ b/service/dconf-writer.h
@@ -20,7 +20,9 @@
#ifndef __dconf_writer_h__
#define __dconf_writer_h__
+#include <glib.h>
#include <gio/gio.h>
+#include <gobject/gobject.h>
#include "../common/dconf-changeset.h"
#include "dconf-generated.h"
@@ -65,6 +67,7 @@ struct _DConfWriter
DConfWriterPrivate *priv;
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (DConfWriter, g_object_unref)
GType dconf_writer_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]