summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-12-05 14:20:41 +1300
committerRobert Ancell <robert.ancell@canonical.com>2017-12-05 14:20:41 +1300
commit9568eccdaa3c9cfcd129c4e7a53584ea5866772b (patch)
tree3f7509c0567b95b71599ae82ff228e450d7f09f0
parentbfd35b85156feec154d46f5d476407e6dcd2f661 (diff)
downloadgdm-9568eccdaa3c9cfcd129c4e7a53584ea5866772b.tar.gz
Generate autocleanup definitions in libgdm
-rw-r--r--libgdm/Makefile.am2
-rw-r--r--libgdm/gdm-client.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/libgdm/Makefile.am b/libgdm/Makefile.am
index 99ada9aa..2f7d7b61 100644
--- a/libgdm/Makefile.am
+++ b/libgdm/Makefile.am
@@ -12,6 +12,7 @@ gdm-manager-glue.c gdm-manager-glue.h : $(top_srcdir)/daemon/gdm-manager.xml Mak
--c-namespace Gdm \
--interface-prefix=org.gnome.DisplayManager \
--generate-c-code=gdm-manager-glue \
+ --c-generate-autocleanup=all \
--annotate "org.gnome.DisplayManager.Manager" \
"org.gtk.GDBus.C.Name" Manager \
$(top_srcdir)/daemon/gdm-manager.xml
@@ -21,6 +22,7 @@ gdm-client-glue.c gdm-client-glue.h : $(top_srcdir)/daemon/gdm-session.xml Makef
--c-namespace Gdm \
--interface-prefix=org.gnome.DisplayManager \
--generate-c-code=gdm-client-glue \
+ --c-generate-autocleanup=all \
--annotate "org.gnome.DisplayManager.UserVerifier" \
"org.gtk.GDBus.C.Name" UserVerifier \
--annotate "org.gnome.DisplayManager.Greeter" \
diff --git a/libgdm/gdm-client.h b/libgdm/gdm-client.h
index 1ae3d39e..8718a2ef 100644
--- a/libgdm/gdm-client.h
+++ b/libgdm/gdm-client.h
@@ -122,6 +122,10 @@ GdmChooser *gdm_client_get_chooser_sync (GdmClient *client,
GCancellable *cancellable,
GError **error);
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GdmClient, g_object_unref)
+#endif
+
G_END_DECLS
#endif /* __GDM_CLIENT_H */