[Spice-devel] [PATCH] macros: make SPICE_CONTAINEROF more typesafe

Frediano Ziglio fziglio at redhat.com
Tue Jan 12 07:48:23 PST 2016


> On Tue, Jan 12, 2016 at 10:30:53AM -0500, Frediano Ziglio wrote:
> > > 
> > > Hey,
> > > 
> > > I just realized that this patch breaks the build of spice 0.12.6 (and
> > > earlier). I don't think upgrading spice-protocol should cause such
> > > breakage, if we can't turn this to a warning, I would revert the patch
> > > (or wrap it in some #ifdef SPICE_STRICT_TYPE_CHECK)
> > > 
> > > Christophe
> > > 
> > 
> > Won't be better to fix the code?
> 
> We cannot fix the code of already released spice-server versions.
> 
> > And why old versions should use a newer spice-protocol ?
> 
> Imo the question is rather the opposite one, spice-protocol has been
> backward-compatible so far, any new enough spice-protocol release can be
> used to build a release of spice-server. I don't think this patch is a
> very good reason to stop doing that.
> 
> Christophe
> 

Make sense. However I would
- use new version only if a SPICE_STRICT_TYPE_CHECK is defined
- define always SPICE_STRICT_TYPE_CHECK on newer spice-server/spice-gtk

Defining a new macro and replace all occurrences of a so widely used
macro does not seem reasonable.

Frediano


More information about the Spice-devel mailing list