From: Rico Tzschichholz Date: Sun, 18 Nov 2018 20:38:09 +0000 (+0100) Subject: girparser: Pick up type_id of error domains X-Git-Tag: 0.55.90~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=147cf8ace00c314dcf5e9bff62e02f68746b5664;p=thirdparty%2Fvala.git girparser: Pick up type_id of error domains --- 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;