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



commit 1148b2774d2c60f6dcc5e58fa8274f98b41ce570
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]