mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
parent
eafcdd2eb6
commit
508352339a
@ -738,6 +738,7 @@ G_HAVE_GNUC_VARARGS
|
||||
G_HAVE_ISO_VARARGS
|
||||
G_HAVE_GROWING_STACK
|
||||
G_VA_COPY_AS_ARRAY
|
||||
GLIB_CANNOT_IGNORE_DEPRECATIONS
|
||||
GLIB_DEPRECATED
|
||||
GLIB_DEPRECATED_FOR
|
||||
GLIB_UNAVAILABLE
|
||||
|
@ -720,6 +720,7 @@
|
||||
#else
|
||||
#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
#define G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
#define GLIB_CANNOT_IGNORE_DEPRECATIONS
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -1090,7 +1091,14 @@
|
||||
#define G_UNLIKELY(expr) (expr)
|
||||
#endif
|
||||
|
||||
#if G_GNUC_CHECK_VERSION(3, 1) || defined(__clang__)
|
||||
/* GLIB_CANNOT_IGNORE_DEPRECATIONS is defined above for compilers that do not
|
||||
* have a way to temporarily suppress deprecation warnings. In these cases,
|
||||
* suppress the deprecated attribute altogether (otherwise a simple #include
|
||||
* <glib.h> will emit a barrage of warnings).
|
||||
*/
|
||||
#if defined(GLIB_CANNOT_IGNORE_DEPRECATIONS)
|
||||
#define G_DEPRECATED
|
||||
#elif G_GNUC_CHECK_VERSION(3, 1) || defined(__clang__)
|
||||
#define G_DEPRECATED __attribute__((__deprecated__))
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
#define G_DEPRECATED __declspec(deprecated)
|
||||
@ -1098,7 +1106,9 @@
|
||||
#define G_DEPRECATED
|
||||
#endif
|
||||
|
||||
#if G_GNUC_CHECK_VERSION(4, 5) || defined(__clang__)
|
||||
#if defined(GLIB_CANNOT_IGNORE_DEPRECATIONS)
|
||||
#define G_DEPRECATED_FOR(f) G_DEPRECATED
|
||||
#elif G_GNUC_CHECK_VERSION(4, 5) || defined(__clang__)
|
||||
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))
|
||||
#elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320)
|
||||
#define G_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead"))
|
||||
|
Loading…
Reference in New Issue
Block a user