[libgweather/ebassi/gtk4: 38/56] Add proper deprecation macros
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather/ebassi/gtk4: 38/56] Add proper deprecation macros
- Date: Wed, 13 Oct 2021 12:02:16 +0000 (UTC)
commit 4413fd0f4381e8ec65d34d659ffd99e9745007f4
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]