summaryrefslogtreecommitdiff
path: root/libvaladoc
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-03-20 16:19:35 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-03-20 16:19:35 +0100
commit2f9961f0bc99a209f5e8f3af2e4bb5583a19df6a (patch)
tree68e3ad8b052bfce052516471a4e1035402812cb1 /libvaladoc
parent6bda851954033cd570882517a464f78aff23a2f2 (diff)
downloadvala-2f9961f0bc99a209f5e8f3af2e4bb5583a19df6a.tar.gz
libvaladoc/girimporter: parse_constant() use "c:identifier" attribute first
Diffstat (limited to 'libvaladoc')
-rw-r--r--libvaladoc/importer/girdocumentationimporter.vala10
1 files changed, 9 insertions, 1 deletions
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 ();