[libgweather/ebassi/gtk4] Add proper deprecation macros
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/ebassi/gtk4] Add proper deprecation macros
- Date: Tue, 12 Oct 2021 12:49:44 +0000 (UTC)
commit b846ea89675428ff358dd4127f38e9988cf9a81f
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Oct 11 22:46:44 2021 +0100
Add proper deprecation macros
As well as a way to disable them.
libgweather/gweather-version.h.in | 15 +++++++++++++++
1 file changed, 15 insertions(+)
---
diff --git a/libgweather/gweather-version.h.in b/libgweather/gweather-version.h.in
index 7e5edd77..499af718 100644
--- a/libgweather/gweather-version.h.in
+++ b/libgweather/gweather-version.h.in
@@ -21,6 +21,21 @@
/* Backstop for all symbols available before the introduction of versioned macros */
#define GWEATHER_AVAILABLE_IN_ALL _GWEATHER_EXTERN
+/**
+ * GWEATHER_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * Disable deprecation warnings from GWeather API.
+ *
+ * Must be defined before including `libgweather/gweather.h`.
+ */
+#ifdef GWEATHER_DISABLE_DEPRECATION_WARNINGS
+# define GWEATHER_DEPRECATED _GWEATHER_EXTERN
+# define GWEATHER_DEPRECATED_FOR(f) _GWEATHER_EXTERN
+#else
+# define GWEATHER_DEPRECATED G_DEPRECATED _GWEATHER_EXTERN
+# define GWEATHER_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GWEATHER_EXTERN
+#endif
+
/**
* SECTION:gweatherversion
* @short_description: libgweather version checking
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]