]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapigen: support type_arguments for signal/delegate return types
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 19 Apr 2010 09:43:25 +0000 (02:43 -0700)
committerEvan Nemerson <evan@coeus-group.com>
Mon, 19 Apr 2010 09:43:25 +0000 (02:43 -0700)
Fixes bug 615837.

vapigen/valagidlparser.vala

index a309e9ee5eb37abce20d9f744d3875f0e7dcc252..3f25d23f13295c5659e50e60862de25cfe55abe9 100644 (file)
@@ -305,6 +305,11 @@ public class Vala.GIdlParser : CodeVisitor {
                                        if (eval (nv[1]) == "1") {
                                                return_type.value_owned = true;
                                        }
+                               } else if (nv[0] == "type_arguments") {
+                                       var type_args = eval (nv[1]).split (",");
+                                       foreach (string type_arg in type_args) {
+                                               return_type.add_type_argument (get_type_from_string (type_arg));
+                                       }
                                } else if (nv[0] == "instance_pos") {
                                        cb.cinstance_parameter_position = eval (nv[1]).to_double ();
                                }
@@ -2248,6 +2253,11 @@ public class Vala.GIdlParser : CodeVisitor {
                                        if (eval (nv[1]) == "1") {
                                                sig.return_type.value_owned = true;
                                        }
+                               } else if (nv[0] == "type_arguments") {
+                                       var type_args = eval (nv[1]).split (",");
+                                       foreach (string type_arg in type_args) {
+                                               sig.return_type.add_type_argument (get_type_from_string (type_arg));
+                                       }
                                }
                        }
                }