]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Pick up type_id of error domains
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 18 Nov 2018 20:38:09 +0000 (21:38 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 24 Feb 2022 18:59:24 +0000 (19:59 +0100)
tests/gir/errordomain.test
vala/valagirparser.vala

index 4ff318c79499933cd22b43715299e247620d3929..bf37f46ef86c9fa3d72bd1a19c30b4a78db7a2ec 100644 (file)
@@ -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
index 3babf74241c2cda2e06e902c3e51d8cc1f319b18..6b3d693578526c3bf12c313ab16e516fe39345d7 100644 (file)
@@ -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;