[Spice-devel] [PATCH v2 8/9] Change RedCharDevice::write_queue to GQueue
Jonathon Jongsma
jjongsma at redhat.com
Thu Sep 15 19:51:25 UTC 2016
On Thu, 2016-09-15 at 16:55 +0200, Pavel Grunt wrote:
> Hey,
>
> On Wed, 2016-09-14 at 11:53 -0500, Jonathon Jongsma wrote:
> >
> > Change a couple more Rings to GQueue
> > ---
> > Changes in v2:
> > - use GQueue, not GList
> >
> > server/char-device.c | 79 +++++++++++++++++++++------------------
> > -------------
> >
> > @@ -1119,8 +1104,8 @@ red_char_device_finalize(GObject *object)
> > reds_core_timer_remove(self->priv->reds, self->priv-
> > >
> > > write_to_dev_timer);
> > self->priv->write_to_dev_timer = NULL;
> > }
> > - write_buffers_queue_free(&self->priv->write_queue);
> > - write_buffers_queue_free(&self->priv->write_bufs_pool);
> > + write_buffers_queue_free(self->priv->write_queue);
> > + write_buffers_queue_free(self->priv->write_bufs_pool);
>
> Did you consider using g_queue_free_full() ?
>
> Thanks,
> Pavel
>
I did consider it, but that would free the GQueue structure as well as
all of the elements in the queue. I don't want to do that here. We want
a valid GQueue, but it should be empty.
Jonathon
More information about the Spice-devel
mailing list