From: Matthias Clasen Date: Fri, 3 Mar 2023 11:28:46 +0000 (-0500) Subject: x11: Stop using g_slice X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~553^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5cca7488d4a4701f1bb4d9d806827a7ef34ba473;p=gtk4.git x11: Stop using g_slice --- diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index 0e30ff23b5..a1b1fef9ee 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -1975,7 +1975,7 @@ gdk_x11_display_finalize (GObject *object) if (trap->end_sequence == 0) g_warning ("Display finalized with an unpopped error trap"); - g_slice_free (GdkErrorTrap, trap); + g_free (trap); } g_free (display_x11->program_class); @@ -2499,7 +2499,7 @@ delete_outdated_error_traps (GdkX11Display *display_x11) tmp_list = tmp_list->next; display_x11->error_traps = g_slist_delete_link (display_x11->error_traps, free_me); - g_slice_free (GdkErrorTrap, trap); + g_free (trap); } else { @@ -2531,7 +2531,7 @@ gdk_x11_display_error_trap_push (GdkDisplay *display) /* set up the Xlib callback to tell us about errors */ _gdk_x11_error_handler_push (); - trap = g_slice_new0 (GdkErrorTrap); + trap = g_new0 (GdkErrorTrap, 1); trap->start_sequence = XNextRequest (display_x11->xdisplay); trap->error_code = Success; diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index 49e23787d9..df6ff98d30 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -1783,7 +1783,7 @@ gdk_drag_anim_destroy (GdkDragAnim *anim) { gdk_surface_hide (anim->drag->drag_surface); g_object_unref (anim->drag); - g_slice_free (GdkDragAnim, anim); + g_free (anim); } static gboolean @@ -1882,7 +1882,7 @@ gdk_x11_drag_drop_done (GdkDrag *drag, cairo_surface_destroy (surface); */ - anim = g_slice_new0 (GdkDragAnim); + anim = g_new0 (GdkDragAnim, 1); anim->drag = g_object_ref (x11_drag); anim->frame_clock = gdk_surface_get_frame_clock (x11_drag->drag_surface); anim->start_time = gdk_frame_clock_get_frame_time (anim->frame_clock); diff --git a/gdk/x11/gdkselectionoutputstream-x11.c b/gdk/x11/gdkselectionoutputstream-x11.c index 76815bee65..3175be5e07 100644 --- a/gdk/x11/gdkselectionoutputstream-x11.c +++ b/gdk/x11/gdkselectionoutputstream-x11.c @@ -79,7 +79,7 @@ gdk_x11_pending_selection_notify_new (Window window, { GdkX11PendingSelectionNotify *pending; - pending = g_slice_new0 (GdkX11PendingSelectionNotify); + pending = g_new0 (GdkX11PendingSelectionNotify, 1); pending->n_pending = 1; pending->xevent.type = SelectionNotify; @@ -97,7 +97,7 @@ gdk_x11_pending_selection_notify_new (Window window, static void gdk_x11_pending_selection_notify_free (GdkX11PendingSelectionNotify *notify) { - g_slice_free (GdkX11PendingSelectionNotify, notify); + g_free (notify); } static void @@ -731,7 +731,7 @@ handle_timestamp_done (GObject *stream, g_error_free (error); } - g_slice_free (gulong, user_data); + g_free (user_data); } static void @@ -747,7 +747,7 @@ handle_timestamp (GOutputStream *stream, { gulong *time_; - time_ = g_slice_new (gulong); + time_ = g_new (gulong, 1); *time_ = timestamp; g_output_stream_write_all_async (stream, diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index a76e4824f2..044a1185fa 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -787,7 +787,7 @@ free_pixmap (gpointer datap) } g_object_unref (data->display); - g_slice_free (FreePixmapData, data); + g_free (data); } static void @@ -798,7 +798,7 @@ attach_free_pixmap_handler (cairo_surface_t *surface, static const cairo_user_data_key_t key; FreePixmapData *data; - data = g_slice_new (FreePixmapData); + data = g_new (FreePixmapData, 1); data->display = g_object_ref (display); data->pixmap = pixmap;