diff options
author | Philip Withnall <withnall@endlessm.com> | 2019-07-30 17:59:57 +0100 |
---|---|---|
committer | Philip Withnall <withnall@endlessm.com> | 2019-07-30 17:59:57 +0100 |
commit | 78a18333192511c0ceb9e90403feaf1291f283e6 (patch) | |
tree | 83d25ccdcd525607f2cdfb27c480862a44f061c5 | |
parent | 5780a533aaebcee1f56a778ebdf8b70d32ba393e (diff) | |
download | libgdata-78a18333192511c0ceb9e90403feaf1291f283e6.tar.gz |
demos: Work around GoaObject not supporting g_autolist()
Work around this
bug: https://gitlab.gnome.org/GNOME/gnome-online-accounts/issues/73,
which prevents `GoaObject` being used with `g_autolist()` if GOA was
compiled with an older version of `gdbus-codegen`.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #32
-rw-r--r-- | demos/docs-property/docs-property.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/demos/docs-property/docs-property.c b/demos/docs-property/docs-property.c index b1586141..d4b8f30f 100644 --- a/demos/docs-property/docs-property.c +++ b/demos/docs-property/docs-property.c @@ -42,12 +42,16 @@ static gboolean is_owner (GDataService *service, GDataEntry *entry); static void test_dummy_properties (GDataDocumentsService *service, gboolean set, GCancellable *cancellable, GError **error); +/* FIXME: Work around https://gitlab.gnome.org/GNOME/gnome-online-accounts/issues/73 */ +typedef GoaObject AutoGoaObject; +G_DEFINE_AUTOPTR_CLEANUP_FUNC(AutoGoaObject, g_object_unref) + gint main (void) { g_autoptr(GDataDocumentsService) service = NULL; g_autoptr(GError) error = NULL; - g_autolist(GoaObject) accounts = NULL; + g_autolist(AutoGoaObject) accounts = NULL; GList *l = NULL; g_autoptr(GoaClient) client = NULL; gint retval = 0; |