summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2021-01-19 15:52:29 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2021-01-19 15:52:29 +0000
commitbff359dde6034e1ebb14563f35a4870e559a61e9 (patch)
treea50d98310cbdb9e680318466ac38fc9ac50ddd2b
parent83af3f64f11ff78c0320f6597a814be6d76930d5 (diff)
downloadglib-bff359dde6034e1ebb14563f35a4870e559a61e9.tar.gz
docs: Add documentation for GLIB_VERSION_CUR_STABLE and PREV_STABLE
It was missing. Oh no! Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r--docs/reference/glib/glib-sections.txt2
-rw-r--r--glib/gversionmacros.h24
2 files changed, 23 insertions, 3 deletions
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index eed764893..d20f419af 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -138,6 +138,8 @@ GLIB_VERSION_2_62
GLIB_VERSION_2_64
GLIB_VERSION_2_66
GLIB_VERSION_2_68
+GLIB_VERSION_CUR_STABLE
+GLIB_VERSION_PREV_STABLE
GLIB_VERSION_MIN_REQUIRED
GLIB_VERSION_MAX_ALLOWED
GLIB_DISABLE_DEPRECATION_WARNINGS
diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h
index c2e8f1d90..77486eafb 100644
--- a/glib/gversionmacros.h
+++ b/glib/gversionmacros.h
@@ -255,8 +255,16 @@
*/
#define GLIB_VERSION_2_68 (G_ENCODE_VERSION (2, 68))
-/* evaluates to the current stable version; for development cycles,
- * this means the next stable target
+/**
+ * GLIB_VERSION_CUR_STABLE:
+ *
+ * A macro that evaluates to the current stable version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * During an unstable development cycle, this evaluates to the next stable
+ * (unreleased) version which will be the result of the development cycle.
+ *
+ * Since: 2.32
*/
#if (GLIB_MINOR_VERSION % 2)
#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION + 1))
@@ -264,7 +272,17 @@
#define GLIB_VERSION_CUR_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION))
#endif
-/* evaluates to the previous stable version */
+/**
+ * GLIB_VERSION_PREV_STABLE:
+ *
+ * A macro that evaluates to the previous stable version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * During an unstable development cycle, this evaluates to the most recent
+ * released stable release, which preceded this development cycle.
+ *
+ * Since: 2.32
+ */
#if (GLIB_MINOR_VERSION % 2)
#define GLIB_VERSION_PREV_STABLE (G_ENCODE_VERSION (GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION - 1))
#else