[Spice-devel] [PATCH 09/18] Be consistent with opaque type

Frediano Ziglio fziglio at redhat.com
Tue Sep 27 12:33:14 UTC 2016


> 
> On Mon, Sep 26, 2016 at 09:12:42AM +0100, Frediano Ziglio wrote:
> > vdi_port_read_buf_release is registered passing data as
> > RedVDIReadBuf*, not RedPipeItem*. Cast opaque to proper
> > pointer type to avoid the assumption that first field of
> > RedVDIReadBuf is a RedPipeItem.
> 
> Well, the idea is that VDIReadBuf is a refcounted object, not that it
> contains a refcounted object. The fact that RedPipeItem is abused for
> that is the issue here imo, not the casting/assumption that something
> called 'base' is the first item in the struct.
> 
> Christophe
> 

Even GObject are refcounted but are not RedPipeItem.

Frediano


More information about the Spice-devel mailing list