mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
gmacros.h: Fix stringification in some macros
This makes `GLIB_UNAVAILABLE_MACRO` and `GLIB_DEPRECATED_MACRO_FOR` print their arguments correctly.
This commit is contained in:
parent
f20bcf2969
commit
52ad3ed717
@ -1099,8 +1099,10 @@
|
||||
__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
|
||||
#define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x))
|
||||
#define GLIB_DEPRECATED_MACRO _GLIB_GNUC_DO_PRAGMA(GCC warning "Deprecated pre-processor symbol")
|
||||
#define GLIB_DEPRECATED_MACRO_FOR(f) _GLIB_GNUC_DO_PRAGMA(GCC warning "Deprecated pre-processor symbol, replace with " #f)
|
||||
#define GLIB_UNAVAILABLE_MACRO(maj,min) _GLIB_GNUC_DO_PRAGMA(GCC warning "Not available before " #maj "." #min)
|
||||
#define GLIB_DEPRECATED_MACRO_FOR(f) \
|
||||
_GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Deprecated pre-processor symbol: replace with #f))
|
||||
#define GLIB_UNAVAILABLE_MACRO(maj,min) \
|
||||
_GLIB_GNUC_DO_PRAGMA(GCC warning G_STRINGIFY (Not available before maj.min))
|
||||
#else
|
||||
#define GLIB_DEPRECATED_MACRO
|
||||
#define GLIB_DEPRECATED_MACRO_FOR(f)
|
||||
|
Loading…
Reference in New Issue
Block a user