[libhandy/wip/exalm/dark: 1/6] version: Add 1.6 version macros




commit c37158827d98356b8a4bda089698af12ee1df35f
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Sep 20 13:38:00 2021 +0500

    version: Add 1.6 version macros

 src/hdy-version.h.in | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-version.h.in b/src/hdy-version.h.in
index b31f3043..751a7e2c 100644
--- a/src/hdy-version.h.in
+++ b/src/hdy-version.h.in
@@ -100,6 +100,16 @@
  */
 #define HDY_VERSION_1_4 (HDY_ENCODE_VERSION (1, 4, 0))
 
+/**
+ * HDY_VERSION_1_6:
+ *
+ * A macro that evaluates to the 1.6 version of Handy, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 1.6
+ */
+#define HDY_VERSION_1_6 (HDY_ENCODE_VERSION (1, 6, 0))
+
 #ifndef _HDY_EXTERN
 #define _HDY_EXTERN extern
 #endif
@@ -117,11 +127,11 @@
 #endif
 
 #ifndef HDY_VERSION_MAX_ALLOWED
-# define HDY_VERSION_MAX_ALLOWED HDY_VERSION_1_4
+# define HDY_VERSION_MAX_ALLOWED HDY_VERSION_1_6
 #endif
 
 #ifndef HDY_VERSION_MIN_REQUIRED
-# define HDY_VERSION_MIN_REQUIRED HDY_VERSION_1_4
+# define HDY_VERSION_MIN_REQUIRED HDY_VERSION_1_6
 #endif
 
 #define HDY_UNAVAILABLE(major, minor) G_UNAVAILABLE(major, minor) _HDY_EXTERN
@@ -163,3 +173,21 @@
 # define HDY_DEPRECATED_TYPE_IN_1_4
 # define HDY_DEPRECATED_TYPE_IN_1_4_FOR(f)
 #endif
+
+#if HDY_VERSION_MAX_ALLOWED < HDY_VERSION_1_6
+# define HDY_AVAILABLE_IN_1_6 HDY_UNAVAILABLE(1, 6)
+#else
+# define HDY_AVAILABLE_IN_1_6 _HDY_EXTERN
+#endif
+
+#if HDY_VERSION_MIN_REQUIRED >= HDY_VERSION_1_6
+# define HDY_DEPRECATED_IN_1_6             _HDY_DEPRECATED
+# define HDY_DEPRECATED_IN_1_6_FOR(f)      _HDY_DEPRECATED_FOR(f)
+# define HDY_DEPRECATED_TYPE_IN_1_6        _HDY_DEPRECATED_TYPE
+# define HDY_DEPRECATED_TYPE_IN_1_6_FOR(f) _HDY_DEPRECATED_TYPE_FOR(f)
+#else
+# define HDY_DEPRECATED_IN_1_6             _HDY_EXTERN
+# define HDY_DEPRECATED_IN_1_6_FOR(f)      _HDY_EXTERN
+# define HDY_DEPRECATED_TYPE_IN_1_6
+# define HDY_DEPRECATED_TYPE_IN_1_6_FOR(f)
+#endif


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