[vala/0.50] libvaladoc/girimporter: parse_constant() use "c:identifier" attribute first



commit cb1f83d3e64915a400991f13f5ef80fc561511fb
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Mar 20 16:19:35 2021 +0100

    libvaladoc/girimporter: parse_constant() use "c:identifier" attribute first

 libvaladoc/importer/girdocumentationimporter.vala | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/libvaladoc/importer/girdocumentationimporter.vala 
b/libvaladoc/importer/girdocumentationimporter.vala
index e0ae01d6c..057ab499b 100644
--- a/libvaladoc/importer/girdocumentationimporter.vala
+++ b/libvaladoc/importer/girdocumentationimporter.vala
@@ -849,7 +849,15 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
 
        private void parse_constant () {
                start_element ("constant");
-               string c_identifier = reader.get_attribute ("c:type");
+               string c_identifier = reader.get_attribute ("c:identifier");
+               if (c_identifier == null) {
+                       //TODO G-I seems to do this wrong
+                       c_identifier = reader.get_attribute ("c:type");
+               }
+               if (c_identifier == null) {
+                       skip_element ();
+                       return ;
+               }
                next ();
 
                Api.GirSourceComment? comment = parse_symbol_doc ();


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