From c0cfaeaffe915b12025607df1ac1d156a681c118 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Sat, 21 Jan 2023 15:32:32 +0100 Subject: [PATCH] contacts-row: Use g_autoptr folks 0.14 (shipped in Debian Bullseye) has cleanup functions defined. --- src/calls-contacts-row.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calls-contacts-row.c b/src/calls-contacts-row.c index 0dc614d..c633a8f 100644 --- a/src/calls-contacts-row.c +++ b/src/calls-contacts-row.c @@ -74,8 +74,7 @@ phone_numbers_changed_cb (CallsContactsRow *self) phone_iter = gee_iterable_iterator (GEE_ITERABLE (phone_numbers)); while (gee_iterator_next (phone_iter)) { - // FIXME: We can't use g_autoptr because it's not implemented in the folks version in debian - FolksAbstractFieldDetails *detail = gee_iterator_get (phone_iter); + g_autoptr (FolksAbstractFieldDetails) detail = gee_iterator_get (phone_iter); if (FOLKS_IS_PHONE_FIELD_DETAILS (detail)) { FolksPhoneFieldDetails *phone = FOLKS_PHONE_FIELD_DETAILS (detail); @@ -84,7 +83,6 @@ phone_numbers_changed_cb (CallsContactsRow *self) if (number) insert_phonenumber (self, number); } - g_object_unref (detail); } }