summaryrefslogtreecommitdiff
path: root/codegen/valagirwriter.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-09-29 00:29:20 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2021-10-01 20:52:01 +0200
commitb60266ea9ba52558a9190d8637676d68b22442b9 (patch)
treeb1737210eff6249a1cceac3bfee825a51cdb40b5 /codegen/valagirwriter.vala
parent76a08b801f5f0db5322d4c6d5bd17cae4f1ab337 (diff)
downloadvala-b60266ea9ba52558a9190d8637676d68b22442b9.tar.gz
Set TypeParameter as symbol of GenericType
Diffstat (limited to 'codegen/valagirwriter.vala')
-rw-r--r--codegen/valagirwriter.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 22b024513..696c6c8a6 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -1672,6 +1672,10 @@ public class Vala.GIRWriter : CodeVisitor {
} else if (type is PointerType) {
write_indent ();
buffer.append_printf ("<type name=\"gpointer\" c:type=\"%s%s\"/>\n", get_ccode_name (type), direction == ParameterDirection.IN ? "" : "*");
+ } else if (type is GenericType) {
+ // generic type parameters not supported in GIR
+ write_indent ();
+ buffer.append ("<type name=\"gpointer\" c:type=\"gpointer\"/>\n");
} else if (type is DelegateType) {
var deleg_type = (DelegateType) type;
write_indent ();
@@ -1700,10 +1704,6 @@ public class Vala.GIRWriter : CodeVisitor {
write_indent ();
buffer.append_printf ("</%s>\n", is_array ? "array" : "type");
}
- } else if (type is GenericType) {
- // generic type parameters not supported in GIR
- write_indent ();
- buffer.append ("<type name=\"gpointer\" c:type=\"gpointer\"/>\n");
} else {
write_indent ();
buffer.append_printf ("<type name=\"%s\"/>\n", type.to_string ());