Re: [protocol] macros: Use GLib's G_DEPRECATED macro if available

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

 



Hey,

On Fri, Oct 28, 2016 at 11:27:02AM +0200, Francois Gouget wrote:
> This gains us automatic support for whichever compilers GLib supports in
> this macro when used in projects that use GLib.
> 
> Signed-off-by: Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
> ---
> 
> This can make sense if we consider GLib to be a platform similar to gcc, 
> MSVC: it just provides a G_XXX API instead of an __attribute((xxx)) or 
> __declspec(xxx) one.
> 
> Also note that the same thing could be done with a number of other 
> macros like SPICE_GNUC_WARN_UNUSED_RESULT, SPICE_GNUC_MAY_ALIAS, 
> SPICE_GNUC_CONST, etc. Let me know if I should submit one patch for 
> each, one for all or something else...

I believe all of these were more or less directly imported from glib.
Grepping around, I could only find SPICE_GNUC_VISIBLE, SPICE_GNUC_NORETURN,
SPICE_GNUC_UNUSED, SPICE_GNUC_PRINTF and SPICE_GNUC_DEPRECATED being
used. At this point, I'd just make sure the other ones emit a (compile
time) warning when they are used unless some magic define is set, and
drop them after a while.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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]