[gtk-doc] mkdb: ensure that fallback stability is a trimmed string



commit 2009441628aab105ffc7d002f1c0a64c184d1f84
Author: Stefan Sauer <ensonic users sf net>
Date:   Mon Jan 8 20:43:33 2018 +0100

    mkdb: ensure that fallback stability is a trimmed string
    
    The docs are not very preceise what value is supported and while we canoni-
    calize a few values, we must ensure the other values are atleast strings.
    
    Fixes #791928

 gtkdoc/mkdb.py                      |    5 +++--
 tests/bugs/docs/tester-docs.xml     |    2 +-
 tests/bugs/docs/tester-sections.txt |    1 +
 tests/bugs/src/tester.h             |   10 ++++++++++
 4 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/gtkdoc/mkdb.py b/gtkdoc/mkdb.py
index 07ad659..9c3b7c5 100644
--- a/gtkdoc/mkdb.py
+++ b/gtkdoc/mkdb.py
@@ -2033,7 +2033,8 @@ def ParseStabilityLevel(stability, file, line, message):
     Returns:
         str: the parsed stability level string.
     """
-    sl = stability.strip().lower()
+    stability = stability.strip()
+    sl = stability.lower()
     if sl == 'stable':
         stability = "Stable"
     elif sl == 'unstable':
@@ -2043,7 +2044,7 @@ def ParseStabilityLevel(stability, file, line, message):
     else:
         common.LogWarning(file, line, "%s is %s." % (message, stability) +
                           "It should be one of these: Stable, Unstable, or Private.")
-    return stability
+    return str(stability)
 
 
 def OutputDBFile(file, title, section_id, includes, functions_synop, other_synop, functions_details, 
other_details, signals_synop, signals_desc, args_synop, args_desc, hierarchy, interfaces, implementations, 
prerequisites, derived, file_objects):
diff --git a/tests/bugs/docs/tester-docs.xml b/tests/bugs/docs/tester-docs.xml
index 862f744..7efead4 100644
--- a/tests/bugs/docs/tester-docs.xml
+++ b/tests/bugs/docs/tester-docs.xml
@@ -33,5 +33,5 @@
     <title>Index of new API in 0.1</title>
     <xi:include href="xml/api-index-0.1.xml"><xi:fallback /></xi:include>
   </index>
-
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
 </book>
diff --git a/tests/bugs/docs/tester-sections.txt b/tests/bugs/docs/tester-sections.txt
index fe1013c..2669275 100644
--- a/tests/bugs/docs/tester-sections.txt
+++ b/tests/bugs/docs/tester-sections.txt
@@ -72,6 +72,7 @@ bug_741941
 bug_732689
 bug_783420
 gst_play_marshal_BUFFER__BOXED
+BUG_791928
 <SUBSECTION Standard>
 <SUBSECTION Private>
 GTKDOC_GNUC_CONST
diff --git a/tests/bugs/src/tester.h b/tests/bugs/src/tester.h
index 4958374..24a94cd 100644
--- a/tests/bugs/src/tester.h
+++ b/tests/bugs/src/tester.h
@@ -553,4 +553,14 @@ typedef enum
  */
 #define _(str) str
 
+/**
+ * BUG_791928:
+ *
+ * https://bugzilla.gnome.org/show_bug.cgi?id=791928
+ *
+ * Stability: UndefinedTestValue
+ */
+#define BUG_791928   1
+
+
 #endif // GTKDOC_TESTER_H


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