From e190ff16cc5cf49fcf5efef5165c39e39849fad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 8 Jan 2023 00:55:04 +0000 Subject: [PATCH] iterator: drop use of GSlice Part-of: --- subprojects/gstreamer/gst/gstiterator.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/subprojects/gstreamer/gst/gstiterator.c b/subprojects/gstreamer/gst/gstiterator.c index af8d2b170d..b661aadc65 100644 --- a/subprojects/gstreamer/gst/gstiterator.c +++ b/subprojects/gstreamer/gst/gstiterator.c @@ -68,6 +68,7 @@ */ #include "gst_private.h" +#include "glib-compat-private.h" #include /** @@ -83,7 +84,7 @@ gst_iterator_copy (const GstIterator * it) { GstIterator *copy; - copy = g_slice_copy (it->size, it); + copy = g_memdup2 (it, it->size); if (it->copy) it->copy (it, copy); @@ -159,7 +160,7 @@ gst_iterator_new (guint size, g_return_val_if_fail (resync != NULL, NULL); g_return_val_if_fail (free != NULL, NULL); - result = g_slice_alloc0 (size); + result = g_malloc0 (size); gst_iterator_init (result, size, type, lock, master_cookie, copy, next, item, resync, free); @@ -422,7 +423,7 @@ gst_iterator_free (GstIterator * it) it->free (it); - g_slice_free1 (it->size, it); + g_free (it); } /**