[vala/0.40] libvaladoc/girimporter: Fallback to "glib:type-name" for class, interface and record
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] libvaladoc/girimporter: Fallback to "glib:type-name" for class, interface and record
- Date: Sat, 5 Sep 2020 14:53:31 +0000 (UTC)
commit 386c98b9c3a75930f3d88f3aa3622d0adcb42043
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Aug 24 17:03:43 2020 +0200
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
libvaladoc/importer/girdocumentationimporter.vala | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/libvaladoc/importer/girdocumentationimporter.vala
b/libvaladoc/importer/girdocumentationimporter.vala
index 9a9d98b09..1ce11b39c 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]