[vala/wip/error-gtype: 8/11] girparser: Pick up type_id of error domains
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/error-gtype: 8/11] girparser: Pick up type_id of error domains
- Date: Thu, 24 Feb 2022 14:28:53 +0000 (UTC)
commit ee6ba7e1b9a707df95b83734b15a40a99b11bc70
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Nov 18 21:38:09 2018 +0100
girparser: Pick up type_id of error domains
tests/gir/errordomain.test | 4 ++--
vala/valagirparser.vala | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/tests/gir/errordomain.test b/tests/gir/errordomain.test
index 4ff318c79..bf37f46ef 100644
--- a/tests/gir/errordomain.test
+++ b/tests/gir/errordomain.test
@@ -33,12 +33,12 @@ Input:
Output:
-[CCode (cheader_filename = "test.h", cname = "TestError", cprefix = "TEST_ERROR_")]
+[CCode (cheader_filename = "test.h", cname = "TestError", cprefix = "TEST_ERROR_", has_type_id = false)]
public errordomain TestError {
BAR,
FOO
}
-[CCode (cheader_filename = "test.h", cname = "TestErrorWithType", cprefix = "TEST_ERROR_WITH_TYPE_")]
+[CCode (cheader_filename = "test.h", cname = "TestErrorWithType", cprefix = "TEST_ERROR_WITH_TYPE_", type_id
= "test_error_with_type_get_type ()")]
public errordomain TestErrorWithType {
BAR,
FOO
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 3babf7424..6b3d69357 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2451,8 +2451,7 @@ public class Vala.GirParser : CodeVisitor {
sym = current.symbol;
}
- if (!error_domain)
- set_type_id_ccode (sym);
+ set_type_id_ccode (sym);
sym.access = SymbolAccessibility.PUBLIC;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]