summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenedikt Ames <14768-wisperwind@users.noreply.gitlab.freedesktop.org>2022-04-26 16:31:05 +0000
committerJan Rybar <jrybar@redhat.com>2022-04-26 16:31:05 +0000
commit63c02dc9e80e99e38c04514917a49a574e344e36 (patch)
tree4083b7b6568d88d4c018d618b02f5a361586c285 /src
parent56bde409579052c3c5c1f4372cd9c3782845b807 (diff)
downloadpolkit-63c02dc9e80e99e38c04514917a49a574e344e36.tar.gz
polkitagent: Add g_autoptr() support for GObject-derived types
Diffstat (limited to 'src')
-rw-r--r--src/polkitagent/polkitagenttypes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/polkitagent/polkitagenttypes.h b/src/polkitagent/polkitagenttypes.h
index 1de03c6..bcc59fb 100644
--- a/src/polkitagent/polkitagenttypes.h
+++ b/src/polkitagent/polkitagenttypes.h
@@ -39,6 +39,12 @@ typedef struct _PolkitAgentTextListener PolkitAgentTextListener;
struct _PolkitAgentSession;
typedef struct _PolkitAgentSession PolkitAgentSession;
+#if GLIB_CHECK_VERSION(2, 44, 0)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAgentListener, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAgentTextListener, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (PolkitAgentSession, g_object_unref)
+#endif
+
G_END_DECLS
#endif /* __POLKIT_AGENT_TYPES_H */