Re: [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

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

 



On Fri, 12 Aug 2016, Frediano Ziglio wrote:

> > 
> > On Fri, 12 Aug 2016, Frediano Ziglio wrote:
> > 
> > > > 
> > > > If the user specifically requests access to the deprecated APIs by
> > > > defining the SPICE_DEPRECATED macro, then turn off the
> > > > SPICE_GNUC_DEPRECATED* warnings.
> > > > Also automatically use G_GNUC_DEPRECATED if available.
> > > > Add SPICE_GNUC_DEPRECATED_FOR().
> > > > 
> > > 
> > > I'm not really sure it's a good idea to disable deprecation
> > > warnings. If a program does want to ignore warnings I will
> > > just force to avoid -Werror and tolerate the warnings.
> > 
> > The deprecation warnings are only disabled if one defines
> > SPICE_DEPRECATED, which is obviously not the case by default.
> > 
> > This is needed by spice-gtk so it can implement those deprecated APIs
> > that other applications may want to use without getting warnings
> > itself.
> > 
> 
> in spice-core.h these lines:
> 
> #ifdef SPICE_SERVER_INTERNAL
> #undef SPICE_GNUC_DEPRECATED
> #define SPICE_GNUC_DEPRECATED
> #endif
> 
> are used to do it.

That seems redundant with the SPICE_DEPRECATED mechanism. Also, as in 
spice-gtk, it's again global (-DSPICE_SERVER_INTERNAL in 
server/Makefile.am), impacting all the Spice server source files, even 
those that have no business using the deprecated APIs.

It's also yet another way of achieving the same thing:
 * spice-protocol -> define SPICE_DEPRECATED
 * spice-gtk      -> define SPICE_NO_DEPRECATED
 * spice          -> define SPICE_SERVER_INTERNAL


-- 
Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




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