[glib: 1/2] docs: Add documentation for GLIB_VERSION_CUR_STABLE and PREV_STABLE




commit bff359dde6034e1ebb14563f35a4870e559a61e9
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jan 19 15:52:29 2021 +0000

    docs: Add documentation for GLIB_VERSION_CUR_STABLE and PREV_STABLE
    
    It was missing. Oh no!
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 docs/reference/glib/glib-sections.txt |  2 ++
 glib/gversionmacros.h                 | 24 +++++++++++++++++++++---
 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


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