summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-03-03 06:53:53 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-03-14 14:56:42 -0400
commit61d53b64022fe082cc3b63fe580b12b023b090a8 (patch)
tree75c660c14dbe167325c38aa5667c8691fd5ca8e2 /tests
parentfe79c7db1693963e44412b7426fc803097402706 (diff)
downloadgtk+-61d53b64022fe082cc3b63fe580b12b023b090a8.tar.gz
tests: Stop using g_slice
Diffstat (limited to 'tests')
-rw-r--r--tests/testcolumnview.c4
-rw-r--r--tests/testlistview.c4
-rw-r--r--tests/video-timer.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/testcolumnview.c b/tests/testcolumnview.c
index 4039e9ec79..b09888de8e 100644
--- a/tests/testcolumnview.c
+++ b/tests/testcolumnview.c
@@ -222,7 +222,7 @@ row_data_free (gpointer _data)
row_data_unbind (data);
- g_slice_free (RowData, data);
+ g_free (data);
}
static void
@@ -232,7 +232,7 @@ setup_widget (GtkListItem *list_item,
GtkWidget *box, *child;
RowData *data;
- data = g_slice_new0 (RowData);
+ data = g_new0 (RowData, 1);
g_signal_connect (list_item, "notify::item", G_CALLBACK (row_data_notify_item), data);
g_object_set_data_full (G_OBJECT (list_item), "row-data", data, row_data_free);
diff --git a/tests/testlistview.c b/tests/testlistview.c
index f0f172f98f..d29ad88a06 100644
--- a/tests/testlistview.c
+++ b/tests/testlistview.c
@@ -479,7 +479,7 @@ row_data_free (gpointer _data)
row_data_unbind (data);
- g_slice_free (RowData, data);
+ g_free (data);
}
static void
@@ -489,7 +489,7 @@ setup_widget (GtkSignalListItemFactory *factory,
GtkWidget *box, *child;
RowData *data;
- data = g_slice_new0 (RowData);
+ data = g_new0 (RowData, 1);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_list_item_set_child (list_item, box);
diff --git a/tests/video-timer.c b/tests/video-timer.c
index 1a8a04da05..c7667124cf 100644
--- a/tests/video-timer.c
+++ b/tests/video-timer.c
@@ -107,7 +107,7 @@ create_frames_thread (gpointer data)
while (TRUE)
{
- FrameData *frame_data = g_slice_new0 (FrameData);
+ FrameData *frame_data = g_new0 (FrameData, 1);
frame_data->angle = 2 * M_PI * (frame_count % fps) / (double)fps;
frame_data->stream_time = (G_GINT64_CONSTANT (1000000) * frame_count) / fps;
@@ -266,7 +266,7 @@ collect_old_frames (void)
if (remove)
{
past_frames = g_list_delete_link (past_frames, l);
- g_slice_free (FrameData, frame_data);
+ g_free (frame_data);
}
}
}
@@ -329,7 +329,7 @@ on_update (GdkFrameClock *frame_clock,
stream_time_to_clock_time (next_frame->stream_time)
< predicted_presentation_time + refresh_interval / 2)
{
- g_slice_free (FrameData, unqueue_frame ());
+ g_free (unqueue_frame ());
n_frames++;
dropped_frames++;
pending_frame = next_frame;