]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapigen: allow metadata to set type_id
authorJaap A. Haitsma <jaap@haitsma.org>
Sat, 18 Jul 2009 08:51:34 +0000 (10:51 +0200)
committerJaap A. Haitsma <jaap@haitsma.org>
Sat, 18 Jul 2009 08:51:34 +0000 (10:51 +0200)
Patch by Evan Nemerson <evan@polussystems.com>
Fixes bug #588703

vapigen/valagidlparser.vala

index 281019bffafe02d9eb2a464e436530334d258287..bad2e099ca7d7fde2119de8a23223e280b7e0559 100644 (file)
@@ -430,6 +430,12 @@ public class Vala.GIdlParser : CodeVisitor {
                                                        if (eval (nv[1]) == "0") {
                                                                st.use_const = false;
                                                        }
+                                               } else if (nv[0] == "has_type_id") {
+                                                       if (eval (nv[1]) == "0") {
+                                                               st.has_type_id = false;
+                                                       }
+                                               } else if (nv[0] == "type_id") {
+                                                       st.set_type_id (eval (nv[1]));
                                                }
                                        }
                                }