summaryrefslogtreecommitdiff
path: root/liblightdm-gobject/lightdm/session.h
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2016-01-25 14:14:03 +1300
committerRobert Ancell <robert.ancell@canonical.com>2016-01-25 14:14:03 +1300
commit3c438ca4a21212f21618889d35fe0637aa8c33be (patch)
tree00c394053a830ba0410f4db6ead7d7a187c5e579 /liblightdm-gobject/lightdm/session.h
parent3ba8ec8d06c06f0d11d2d61b7d7544f2a1d4f725 (diff)
downloadlightdm-3c438ca4a21212f21618889d35fe0637aa8c33be.tar.gz
Add support for g_autoptr and liblightdm-gobject
Diffstat (limited to 'liblightdm-gobject/lightdm/session.h')
-rw-r--r--liblightdm-gobject/lightdm/session.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/liblightdm-gobject/lightdm/session.h b/liblightdm-gobject/lightdm/session.h
index 13ddcd9f..9c447e1f 100644
--- a/liblightdm-gobject/lightdm/session.h
+++ b/liblightdm-gobject/lightdm/session.h
@@ -40,6 +40,14 @@ typedef struct
void (*reserved6) (void);
} LightDMSessionClass;
+#ifdef GLIB_VERSION_2_44
+typedef LightDMSession *LightDMSession_autoptr;
+static inline void glib_autoptr_cleanup_LightDMSession (LightDMSession **_ptr)
+{
+ glib_autoptr_cleanup_GObject ((GObject **) _ptr);
+}
+#endif
+
GType lightdm_session_get_type (void);
GList *lightdm_get_sessions (void);