Re: [client 1/5] gstreamer: Avoid direct access to GQueue fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Fri, 14 Jun 2019, Frediano Ziglio wrote:
> 
> > > 
> > > Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
> > 
> > Considering that the field is public and that code will get
> > slower and bigger at least would be good to describe the reason
> > why you consider it better.
> 
> Consistency mostly. This is the only place where we access the GQueue
> fields. In other places we use g_queue_peek_head_link() instead of
> decoding_queue->head for instance.
> 
> But I'm fine with keeping decoding_queue->length if that's preferred.
> 

I would personally just use the field.

Looking at GLib gqueue.h header looks like the structure was intended to
be partially opaque but got fully public since 2.14 version (see
G_QUEUE_INIT).
The "Contains the public fields of a ..." comment on _GQueue structure
should be changed to "Contains the fields of a".

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]