summaryrefslogtreecommitdiff
path: root/libvaladoc
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2020-08-24 17:03:43 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2020-08-24 17:27:43 +0200
commit7c01b07361e3becac64d898492a998a7a038a7b2 (patch)
tree198c60af3c56550803af964945be2311c452aeaa /libvaladoc
parenta08d5ced8dab35174a79639b7450fd7b462bf419 (diff)
downloadvala-7c01b07361e3becac64d898492a998a7a038a7b2.tar.gz
libvaladoc/girimporter: Fallback to "glib:type-name" for class, interface and record
This caused criticals like: valadoc_importer_gir_documentation_importer_attach_comment: assertion 'cname != NULL' failed
Diffstat (limited to 'libvaladoc')
-rw-r--r--libvaladoc/importer/girdocumentationimporter.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/libvaladoc/importer/girdocumentationimporter.vala b/libvaladoc/importer/girdocumentationimporter.vala
index 7be872f22..b528a178d 100644
--- a/libvaladoc/importer/girdocumentationimporter.vala
+++ b/libvaladoc/importer/girdocumentationimporter.vala
@@ -486,6 +486,9 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
private void parse_record () {
start_element ("record");
this.parent_c_identifier = reader.get_attribute ("c:type");
+ if (this.parent_c_identifier == null) {
+ this.parent_c_identifier = reader.get_attribute ("glib:type-name");
+ }
if (this.parent_c_identifier.has_suffix ("Private")) {
this.parent_c_identifier = null;
skip_element ();
@@ -525,6 +528,9 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
private void parse_class () {
start_element ("class");
this.parent_c_identifier = reader.get_attribute ("c:type");
+ if (this.parent_c_identifier == null) {
+ this.parent_c_identifier = reader.get_attribute ("glib:type-name");
+ }
next ();
Api.GirSourceComment? comment = parse_symbol_doc ();
@@ -565,6 +571,9 @@ public class Valadoc.Importer.GirDocumentationImporter : DocumentationImporter {
private void parse_interface () {
start_element ("interface");
this.parent_c_identifier = reader.get_attribute ("c:type");
+ if (this.parent_c_identifier == null) {
+ this.parent_c_identifier = reader.get_attribute ("glib:type-name");
+ }
next ();
Api.GirSourceComment? comment = parse_symbol_doc ();