summaryrefslogtreecommitdiff
path: root/gtk/gtksizerequestcache.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-03-03 07:10:51 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-03-14 14:56:42 -0400
commita36123c802ba27e4e1fcb94c4b8cc9515bcf21ec (patch)
tree80f8a3bf5a3c37d92f9609bb0e512b8cd6b4a24e /gtk/gtksizerequestcache.c
parent9f88dba1622a02b44f49fc0079b7810e588347d3 (diff)
downloadgtk+-a36123c802ba27e4e1fcb94c4b8cc9515bcf21ec.tar.gz
gtk: Stop using g_slice
Diffstat (limited to 'gtk/gtksizerequestcache.c')
-rw-r--r--gtk/gtksizerequestcache.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtksizerequestcache.c b/gtk/gtksizerequestcache.c
index 49e5e9d5d0..434db3b0d4 100644
--- a/gtk/gtksizerequestcache.c
+++ b/gtk/gtksizerequestcache.c
@@ -37,9 +37,9 @@ free_sizes_x (SizeRequestX **sizes)
int i;
for (i = 0; i < GTK_SIZE_REQUEST_CACHED_SIZES && sizes[i] != NULL; i++)
- g_slice_free (SizeRequestX, sizes[i]);
+ g_free (sizes[i]);
- g_slice_free1 (sizeof (SizeRequestY *) * GTK_SIZE_REQUEST_CACHED_SIZES, sizes);
+ g_free (sizes);
}
static void
@@ -48,9 +48,9 @@ free_sizes_y (SizeRequestY **sizes)
int i;
for (i = 0; i < GTK_SIZE_REQUEST_CACHED_SIZES && sizes[i] != NULL; i++)
- g_slice_free (SizeRequestY, sizes[i]);
+ g_free (sizes[i]);
- g_slice_free1 (sizeof (SizeRequestY *) * GTK_SIZE_REQUEST_CACHED_SIZES, sizes);
+ g_free (sizes);
}
void
@@ -144,10 +144,10 @@ _gtk_size_request_cache_commit (SizeRequestCache *cache,
}
if (cache->requests_x == NULL)
- cache->requests_x = g_slice_alloc0 (sizeof (SizeRequestX *) * GTK_SIZE_REQUEST_CACHED_SIZES);
+ cache->requests_x = g_new0 (SizeRequestX *, GTK_SIZE_REQUEST_CACHED_SIZES);
if (cache->requests_x[cache->flags[orientation].last_cached_request] == NULL)
- cache->requests_x[cache->flags[orientation].last_cached_request] = g_slice_new (SizeRequestX);
+ cache->requests_x[cache->flags[orientation].last_cached_request] = g_new (SizeRequestX, 1);
cached_size = cache->requests_x[cache->flags[orientation].last_cached_request];
cached_size->lower_for_size = for_size;
@@ -188,10 +188,10 @@ _gtk_size_request_cache_commit (SizeRequestCache *cache,
}
if (cache->requests_y == NULL)
- cache->requests_y = g_slice_alloc0 (sizeof (SizeRequestY *) * GTK_SIZE_REQUEST_CACHED_SIZES);
+ cache->requests_y = g_new0 (SizeRequestY *, GTK_SIZE_REQUEST_CACHED_SIZES);
if (cache->requests_y[cache->flags[orientation].last_cached_request] == NULL)
- cache->requests_y[cache->flags[orientation].last_cached_request] = g_slice_new (SizeRequestY);
+ cache->requests_y[cache->flags[orientation].last_cached_request] = g_new (SizeRequestY, 1);
cached_size = cache->requests_y[cache->flags[orientation].last_cached_request];
cached_size->lower_for_size = for_size;