From 42bd9627a5414fe55c93591f5ae394c21e9524fd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 18 Dec 2023 14:26:49 +0100 Subject: [PATCH] gobject: use g_malloc() allocator for GObjectNotifyQueue struct The GSlice allocator is deprecated. Use g_new0() instead. --- gobject/gobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gobject/gobject.c b/gobject/gobject.c index aa1684ea3..11545175c 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -210,7 +210,7 @@ g_object_notify_queue_free (gpointer data) GObjectNotifyQueue *nqueue = data; g_slist_free (nqueue->pspecs); - g_slice_free (GObjectNotifyQueue, nqueue); + g_free_sized (nqueue, sizeof (GObjectNotifyQueue)); } static GObjectNotifyQueue * @@ -218,7 +218,7 @@ g_object_notify_queue_create_queue_frozen (GObject *object) { GObjectNotifyQueue *nqueue; - nqueue = g_slice_new0 (GObjectNotifyQueue); + nqueue = g_new0 (GObjectNotifyQueue, 1); *nqueue = (GObjectNotifyQueue){ .freeze_count = 1,