summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-05-04 09:10:11 +0200
committerAlexander Larsson <alexl@redhat.com>2016-05-04 09:10:11 +0200
commitde9fe1cb6ae36376050516973575a688d01030a4 (patch)
tree92babb5874bc04f7c7ad5b75ac8993e8210205de /common
parent131961644d1b8da9ee196916e4eee3f2bc195e0c (diff)
downloadxdg-app-de9fe1cb6ae36376050516973575a688d01030a4.tar.gz
common: Work around new glib codegen autogenerating g_autoptr support
glib master generates g_autoptr support, which causes a multiple declaration conflict. We work around this by using a custom type.
Diffstat (limited to 'common')
-rw-r--r--common/xdg-app-run.c2
-rw-r--r--common/xdg-app-utils.h6
2 files changed, 6 insertions, 2 deletions
diff --git a/common/xdg-app-run.c b/common/xdg-app-run.c
index e4d32f7..38c4126 100644
--- a/common/xdg-app-run.c
+++ b/common/xdg-app-run.c
@@ -2215,7 +2215,7 @@ static void
add_monitor_path_args (GPtrArray *argv_array,
char ***envp_p)
{
- g_autoptr(XdgAppSessionHelper) session_helper = NULL;
+ g_autoptr(AutoXdgAppSessionHelper) session_helper = NULL;
g_autofree char *monitor_path = NULL;
session_helper =
diff --git a/common/xdg-app-utils.h b/common/xdg-app-utils.h
index 5f0fbcc..7dae810 100644
--- a/common/xdg-app-utils.h
+++ b/common/xdg-app-utils.h
@@ -284,7 +284,11 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupRequest, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(SoupURI, soup_uri_free)
#endif
-G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppSessionHelper, g_object_unref)
+/* This uses a weird Auto prefix to avoid conflicts with later added autogenerated autoptr support, per:
+ * https://git.gnome.org/browse/glib/commit/?id=1c6cd5f0a3104aa9b62c7f1d3086181f63e71b59
+ */
+typedef XdgAppSessionHelper AutoXdgAppSessionHelper;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(AutoXdgAppSessionHelper, g_object_unref)
typedef struct XdgAppXml XdgAppXml;