On Wed, Oct 26, 2016 at 02:43:22AM -0400, Frediano Ziglio wrote: > I think that my reasoning is more focuses on the "get refcounting for free" not being > a great design so willing to change and I prefer a compile error in the future > instead on the "base type". Well, this makes the intent of the code harder to get imo, this falls apart as soon as an intermediate class is added, ... so I really don't think explicit mentions of the 'base' field in the code is something we should encourage. If wrapped in a macro, why not, but this still leaves the problem that this only work with one level of inheritance. Christophe > > Frediano > > > > > > > > > > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > > > --- > > > server/reds.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > diff --git a/server/reds.c b/server/reds.c > > > index 79f9c9e..a71029f 100644 > > > --- a/server/reds.c > > > +++ b/server/reds.c > > > @@ -745,7 +745,8 @@ static void reds_agent_remove(RedsState *reds) > > > > > > static void vdi_port_read_buf_release(uint8_t *data, void *opaque) > > > { > > > - red_pipe_item_unref((RedPipeItem *)opaque); > > > + RedVDIReadBuf *read_buf = (RedVDIReadBuf *)opaque; > > > + red_pipe_item_unref(&read_buf->base); > > > } > > > > > > /* > > > -- > > > 2.7.4 > > > > > > _______________________________________________ > > > Spice-devel mailing list > > > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > > > https://lists.freedesktop.org/mailman/listinfo/spice-devel > >
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel