• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From 4f79f0712cd5c67301e60e758a2f6c60b44e7a0e Mon Sep 17 00:00:00 2001
2From: Philip Withnall <pwithnall@endlessos.org>
3Date: Mon, 28 Mar 2022 12:55:20 +0100
4Subject: [PATCH] gversionmacros: Add version macros for GLib 2.74
5
6Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
7
8Conflict:NA
9Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/4f79f0712cd5c67301e60e758a2f6c60b44e7a0e
10
11---
12 docs/reference/gio/gio-docs.xml         |  4 +++
13 docs/reference/glib/glib-docs.xml       |  4 +++
14 docs/reference/glib/glib-sections.txt   | 14 ++++++++
15 docs/reference/gobject/gobject-docs.xml |  4 +++
16 docs/reference/meson.build              |  2 +-
17 glib/gversionmacros.h                   | 44 +++++++++++++++++++++++++
18 6 files changed, 71 insertions(+), 1 deletion(-)
19
20diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml
21index 76057e8978..bee46875ff 100644
22--- a/docs/reference/gio/gio-docs.xml
23+++ b/docs/reference/gio/gio-docs.xml
24@@ -400,6 +400,10 @@
25     <title>Index of new symbols in 2.72</title>
26     <xi:include href="xml/api-index-2.72.xml"><xi:fallback /></xi:include>
27   </index>
28+  <index id="api-index-2-74" role="2.74">
29+    <title>Index of new symbols in 2.74</title>
30+    <xi:include href="xml/api-index-2.74.xml"><xi:fallback /></xi:include>
31+  </index>
32
33   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
34
35diff --git a/docs/reference/glib/glib-docs.xml b/docs/reference/glib/glib-docs.xml
36index e642f4e930..b3928257e4 100644
37--- a/docs/reference/glib/glib-docs.xml
38+++ b/docs/reference/glib/glib-docs.xml
39@@ -296,6 +296,10 @@
40     <title>Index of new symbols in 2.72</title>
41     <xi:include href="xml/api-index-2.72.xml"><xi:fallback /></xi:include>
42   </index>
43+  <index id="api-index-2-74" role="2.74">
44+    <title>Index of new symbols in 2.74</title>
45+    <xi:include href="xml/api-index-2.74.xml"><xi:fallback /></xi:include>
46+  </index>
47
48   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
49
50diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
51index 97dcf1f701..3532d28cb0 100644
52--- a/docs/reference/glib/glib-sections.txt
53+++ b/docs/reference/glib/glib-sections.txt
54@@ -140,6 +140,7 @@ GLIB_VERSION_2_66
55 GLIB_VERSION_2_68
56 GLIB_VERSION_2_70
57 GLIB_VERSION_2_72
58+GLIB_VERSION_2_74
59 GLIB_VERSION_CUR_STABLE
60 GLIB_VERSION_PREV_STABLE
61 GLIB_VERSION_MIN_REQUIRED
62@@ -172,6 +173,7 @@ GLIB_AVAILABLE_ENUMERATOR_IN_2_66
63 GLIB_AVAILABLE_ENUMERATOR_IN_2_68
64 GLIB_AVAILABLE_ENUMERATOR_IN_2_70
65 GLIB_AVAILABLE_ENUMERATOR_IN_2_72
66+GLIB_AVAILABLE_ENUMERATOR_IN_2_74
67 GLIB_AVAILABLE_IN_ALL
68 GLIB_AVAILABLE_IN_2_26
69 GLIB_AVAILABLE_IN_2_28
70@@ -197,6 +199,7 @@ GLIB_AVAILABLE_IN_2_66
71 GLIB_AVAILABLE_IN_2_68
72 GLIB_AVAILABLE_IN_2_70
73 GLIB_AVAILABLE_IN_2_72
74+GLIB_AVAILABLE_IN_2_74
75 GLIB_AVAILABLE_MACRO_IN_2_26
76 GLIB_AVAILABLE_MACRO_IN_2_28
77 GLIB_AVAILABLE_MACRO_IN_2_30
78@@ -221,6 +224,7 @@ GLIB_AVAILABLE_MACRO_IN_2_66
79 GLIB_AVAILABLE_MACRO_IN_2_68
80 GLIB_AVAILABLE_MACRO_IN_2_70
81 GLIB_AVAILABLE_MACRO_IN_2_72
82+GLIB_AVAILABLE_MACRO_IN_2_74
83 GLIB_AVAILABLE_STATIC_INLINE_IN_2_44
84 GLIB_AVAILABLE_STATIC_INLINE_IN_2_60
85 GLIB_AVAILABLE_STATIC_INLINE_IN_2_62
86@@ -229,6 +233,7 @@ GLIB_AVAILABLE_STATIC_INLINE_IN_2_66
87 GLIB_AVAILABLE_STATIC_INLINE_IN_2_68
88 GLIB_AVAILABLE_STATIC_INLINE_IN_2_70
89 GLIB_AVAILABLE_STATIC_INLINE_IN_2_72
90+GLIB_AVAILABLE_STATIC_INLINE_IN_2_74
91 GLIB_AVAILABLE_TYPE_IN_2_26
92 GLIB_AVAILABLE_TYPE_IN_2_28
93 GLIB_AVAILABLE_TYPE_IN_2_30
94@@ -253,6 +258,7 @@ GLIB_AVAILABLE_TYPE_IN_2_66
95 GLIB_AVAILABLE_TYPE_IN_2_68
96 GLIB_AVAILABLE_TYPE_IN_2_70
97 GLIB_AVAILABLE_TYPE_IN_2_72
98+GLIB_AVAILABLE_TYPE_IN_2_74
99 GLIB_DEPRECATED_ENUMERATOR
100 GLIB_DEPRECATED_ENUMERATOR_FOR
101 GLIB_DEPRECATED_ENUMERATOR_IN_2_26
102@@ -303,6 +309,8 @@ GLIB_DEPRECATED_ENUMERATOR_IN_2_70
103 GLIB_DEPRECATED_ENUMERATOR_IN_2_70_FOR
104 GLIB_DEPRECATED_ENUMERATOR_IN_2_72
105 GLIB_DEPRECATED_ENUMERATOR_IN_2_72_FOR
106+GLIB_DEPRECATED_ENUMERATOR_IN_2_74
107+GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR
108 GLIB_DEPRECATED_IN_2_26
109 GLIB_DEPRECATED_IN_2_26_FOR
110 GLIB_DEPRECATED_IN_2_28
111@@ -351,6 +359,8 @@ GLIB_DEPRECATED_IN_2_70
112 GLIB_DEPRECATED_IN_2_70_FOR
113 GLIB_DEPRECATED_IN_2_72
114 GLIB_DEPRECATED_IN_2_72_FOR
115+GLIB_DEPRECATED_IN_2_74
116+GLIB_DEPRECATED_IN_2_74_FOR
117 GLIB_DEPRECATED_MACRO
118 GLIB_DEPRECATED_MACRO_FOR
119 GLIB_DEPRECATED_MACRO_IN_2_26
120@@ -401,6 +411,8 @@ GLIB_DEPRECATED_MACRO_IN_2_70
121 GLIB_DEPRECATED_MACRO_IN_2_70_FOR
122 GLIB_DEPRECATED_MACRO_IN_2_72
123 GLIB_DEPRECATED_MACRO_IN_2_72_FOR
124+GLIB_DEPRECATED_MACRO_IN_2_74
125+GLIB_DEPRECATED_MACRO_IN_2_74_FOR
126 GLIB_DEPRECATED_TYPE
127 GLIB_DEPRECATED_TYPE_FOR
128 GLIB_DEPRECATED_TYPE_IN_2_26
129@@ -451,6 +463,8 @@ GLIB_DEPRECATED_TYPE_IN_2_70
130 GLIB_DEPRECATED_TYPE_IN_2_70_FOR
131 GLIB_DEPRECATED_TYPE_IN_2_72
132 GLIB_DEPRECATED_TYPE_IN_2_72_FOR
133+GLIB_DEPRECATED_TYPE_IN_2_74
134+GLIB_DEPRECATED_TYPE_IN_2_74_FOR
135 GLIB_VERSION_CUR_STABLE
136 GLIB_VERSION_PREV_STABLE
137 </SECTION>
138diff --git a/docs/reference/gobject/gobject-docs.xml b/docs/reference/gobject/gobject-docs.xml
139index aa5a9c7220..bfab048372 100644
140--- a/docs/reference/gobject/gobject-docs.xml
141+++ b/docs/reference/gobject/gobject-docs.xml
142@@ -218,6 +218,10 @@
143     <title>Index of new symbols in 2.72</title>
144     <xi:include href="xml/api-index-2.72.xml"><xi:fallback /></xi:include>
145   </index>
146+  <index id="api-index-2-74" role="2.74">
147+    <title>Index of new symbols in 2.74</title>
148+    <xi:include href="xml/api-index-2.74.xml"><xi:fallback /></xi:include>
149+  </index>
150
151   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
152
153diff --git a/docs/reference/meson.build b/docs/reference/meson.build
154index 8128e21bf2..1bc97a2f6e 100644
155--- a/docs/reference/meson.build
156+++ b/docs/reference/meson.build
157@@ -7,7 +7,7 @@
158 stable_2_series_versions = [
159   '26', '28', '30', '32', '34', '36', '38',
160   '40', '42', '44', '46', '48', '50', '52', '54', '56', '58',
161-  '60', '62', '64', '66', '68', '70', '72',
162+  '60', '62', '64', '66', '68', '70', '72', '74',
163 ]
164
165 ignore_decorators = [
166diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h
167index e08c809019..143e048241 100644
168--- a/glib/gversionmacros.h
169+++ b/glib/gversionmacros.h
170@@ -275,6 +275,16 @@
171  */
172 #define GLIB_VERSION_2_72       (G_ENCODE_VERSION (2, 72))
173
174+/**
175+ * GLIB_VERSION_2_74:
176+ *
177+ * A macro that evaluates to the 2.74 version of GLib, in a format
178+ * that can be used by the C pre-processor.
179+ *
180+ * Since: 2.74
181+ */
182+#define GLIB_VERSION_2_74       (G_ENCODE_VERSION (2, 74))
183+
184 /**
185  * GLIB_VERSION_CUR_STABLE:
186  *
187@@ -1164,4 +1174,38 @@
188 # define GLIB_AVAILABLE_TYPE_IN_2_72
189 #endif
190
191+#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_74
192+# define GLIB_DEPRECATED_IN_2_74                GLIB_DEPRECATED
193+# define GLIB_DEPRECATED_IN_2_74_FOR(f)         GLIB_DEPRECATED_FOR(f)
194+# define GLIB_DEPRECATED_MACRO_IN_2_74          GLIB_DEPRECATED_MACRO
195+# define GLIB_DEPRECATED_MACRO_IN_2_74_FOR(f)   GLIB_DEPRECATED_MACRO_FOR(f)
196+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74          GLIB_DEPRECATED_ENUMERATOR
197+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f)   GLIB_DEPRECATED_ENUMERATOR_FOR(f)
198+# define GLIB_DEPRECATED_TYPE_IN_2_74           GLIB_DEPRECATED_TYPE
199+# define GLIB_DEPRECATED_TYPE_IN_2_74_FOR(f)    GLIB_DEPRECATED_TYPE_FOR(f)
200+#else
201+# define GLIB_DEPRECATED_IN_2_74                _GLIB_EXTERN
202+# define GLIB_DEPRECATED_IN_2_74_FOR(f)         _GLIB_EXTERN
203+# define GLIB_DEPRECATED_MACRO_IN_2_74
204+# define GLIB_DEPRECATED_MACRO_IN_2_74_FOR(f)
205+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74
206+# define GLIB_DEPRECATED_ENUMERATOR_IN_2_74_FOR(f)
207+# define GLIB_DEPRECATED_TYPE_IN_2_74
208+# define GLIB_DEPRECATED_TYPE_IN_2_74_FOR(f)
209+#endif
210+
211+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_72
212+# define GLIB_AVAILABLE_IN_2_74                 GLIB_UNAVAILABLE(2, 72)
213+# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_74   GLIB_UNAVAILABLE_STATIC_INLINE(2, 72)
214+# define GLIB_AVAILABLE_MACRO_IN_2_74           GLIB_UNAVAILABLE_MACRO(2, 72)
215+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_74      GLIB_UNAVAILABLE_ENUMERATOR(2, 72)
216+# define GLIB_AVAILABLE_TYPE_IN_2_74            GLIB_UNAVAILABLE_TYPE(2, 72)
217+#else
218+# define GLIB_AVAILABLE_IN_2_74                 _GLIB_EXTERN
219+# define GLIB_AVAILABLE_STATIC_INLINE_IN_2_74
220+# define GLIB_AVAILABLE_MACRO_IN_2_74
221+# define GLIB_AVAILABLE_ENUMERATOR_IN_2_74
222+# define GLIB_AVAILABLE_TYPE_IN_2_74
223+#endif
224+
225 #endif /*  __G_VERSION_MACROS_H__ */
226--
227GitLab
228
229