[libnma/wip/muktupavels/issue-14] stop using gck_list_unref_free




commit 0623736780c0a55d4cdb1e2b6861aa4f8da96322
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Aug 12 21:17:05 2022 +0300

    stop using gck_list_unref_free
    
    https://gitlab.gnome.org/GNOME/libnma/-/issues/14

 configure.ac                         | 1 -
 meson.build                          | 1 -
 src/nma-cert-chooser-button.c        | 4 ++--
 src/nma-pkcs11-cert-chooser-dialog.c | 2 +-
 4 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 512bf317..3e4e7895 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,7 +168,6 @@ AC_DEFUN([CHECK_GCR], [
               void gck_enumerator_next_async (GckEnumerator *self, gint max_objects, GCancellable 
*cancellable,
                                               GAsyncReadyCallback callback, gpointer user_data);
               GList *gck_enumerator_next_finish (GckEnumerator *self, GAsyncResult *result, GError **error);
-              void gck_list_unref_free (GList *reflist);
               GList *gck_modules_get_slots (GList *modules, gboolean token_present);
               void gck_modules_initialize_registered_async (GCancellable *cancellable, GAsyncReadyCallback 
callback,
                                                             gpointer user_data);
diff --git a/meson.build b/meson.build
index 2131a519..c9adb2f7 100644
--- a/meson.build
+++ b/meson.build
@@ -209,7 +209,6 @@ gcr_api_check_src = '''
   void gck_enumerator_next_async (GckEnumerator *self, gint max_objects, GCancellable *cancellable,
                                   GAsyncReadyCallback callback, gpointer user_data);
   GList *gck_enumerator_next_finish (GckEnumerator *self, GAsyncResult *result, GError **error);
-  void gck_list_unref_free (GList *reflist);
   GList *gck_modules_get_slots (GList *modules, gboolean token_present);
   void gck_modules_initialize_registered_async (GCancellable *cancellable, GAsyncReadyCallback callback,
                                                 gpointer user_data);
diff --git a/src/nma-cert-chooser-button.c b/src/nma-cert-chooser-button.c
index 53fc3272..f5f99b87 100644
--- a/src/nma-cert-chooser-button.c
+++ b/src/nma-cert-chooser-button.c
@@ -158,8 +158,8 @@ modules_initialized (GObject *object, GAsyncResult *res, gpointer user_data)
                gck_token_info_free (info);
        }
 
-       gck_list_unref_free (slots);
-       gck_list_unref_free (modules);
+       g_list_free_full (slots, g_object_unref);
+       g_list_free_full (modules, g_object_unref);
 }
 
 static char *
diff --git a/src/nma-pkcs11-cert-chooser-dialog.c b/src/nma-pkcs11-cert-chooser-dialog.c
index af8c8857..c11ef6d7 100644
--- a/src/nma-pkcs11-cert-chooser-dialog.c
+++ b/src/nma-pkcs11-cert-chooser-dialog.c
@@ -228,7 +228,7 @@ next_object (GObject *obj, GAsyncResult *res, gpointer user_data)
                                      NULL, object_details, self);
        }
 
-       gck_list_unref_free (objects);
+       g_list_free_full (objects, g_object_unref);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]