[gnome-panel] libpanel-util: stop using GSlice



commit 89c5bc3771470c3d8b34bde72cfc6f5c35bc3924
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Mar 14 16:04:54 2021 +0200

    libpanel-util: stop using GSlice

 gnome-panel/libpanel-util/panel-cleanup.c | 4 ++--
 gnome-panel/libpanel-util/panel-show.c    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-cleanup.c b/gnome-panel/libpanel-util/panel-cleanup.c
index 9ff00cf05..c279039bb 100644
--- a/gnome-panel/libpanel-util/panel-cleanup.c
+++ b/gnome-panel/libpanel-util/panel-cleanup.c
@@ -45,7 +45,7 @@ panel_cleanup_do (void)
 
                clean = l->data;
                clean->func (clean->data);
-               g_slice_free (PanelClean, clean);
+               g_free (clean);
        }
 
        g_slist_free (cleaner);
@@ -60,7 +60,7 @@ panel_cleanup_register (PanelCleanFunc func,
 
        g_return_if_fail (func != NULL);
 
-       clean = g_slice_new (PanelClean);
+       clean = g_new0 (PanelClean, 1);
        clean->func = func;
        clean->data = data;
 
diff --git a/gnome-panel/libpanel-util/panel-show.c b/gnome-panel/libpanel-util/panel-show.c
index f90555538..e6a06912b 100644
--- a/gnome-panel/libpanel-util/panel-show.c
+++ b/gnome-panel/libpanel-util/panel-show.c
@@ -90,7 +90,7 @@ _panel_show_mount_async_callback (GObject      *source_object,
        if (handle->mount_op)
                g_object_unref (handle->mount_op);
 
-       g_slice_free (PanelShowMountOperationHandle, handle);
+       g_free (handle);
 }
 
 static gboolean
@@ -113,7 +113,7 @@ _panel_show_handle_error (const gchar  *uri,
                GFile *file;
                PanelShowMountOperationHandle *handle;
 
-               handle = g_slice_new (PanelShowMountOperationHandle);
+               handle = g_new0 (PanelShowMountOperationHandle, 1);
                file = g_file_new_for_uri (uri);
 
                /* If it's not mounted, try to mount it ourselves */


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