fix is_out support for parameters
authorJuerg Billeter <j@bitron.ch>
Sat, 24 Nov 2007 15:31:19 +0000 (15:31 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 24 Nov 2007 15:31:19 +0000 (15:31 +0000)
2007-11-24  Juerg Billeter  <j@bitron.ch>

* vapigen/valagidlparser.vala: fix is_out support for parameters

svn path=/trunk/; revision=717

ChangeLog
vapigen/valagidlparser.vala

index fa9802e..9170bda 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-11-24  Jürg Billeter  <j@bitron.ch>
 
+       * vapigen/valagidlparser.vala: fix is_out support for parameters
+
+2007-11-24  Jürg Billeter  <j@bitron.ch>
+
        * vapigen/valagidlparser.vala: support is_out for parameters in the
          metadata
 
index 251ba6f..31ce76e 100644 (file)
@@ -1072,10 +1072,6 @@ public class Vala.GIdlParser : CodeVisitor {
                                                return_type.array_rank = 1;
                                                return_type.is_out = false;
                                        }
-                               } else if (nv[0] == "is_out") {
-                                       if (eval (nv[1]) == "1") {
-                                               return_type.is_out = true;
-                                       }
                                }
                        }
                }
@@ -1115,8 +1111,14 @@ public class Vala.GIdlParser : CodeVisitor {
                                foreach (string attr in attributes) {
                                        var nv = attr.split ("=", 2);
                                        if (nv[0] == "is_array") {
-                                               p.type_reference.array_rank = 1;
-                                               p.type_reference.is_out = false;
+                                               if (eval (nv[1]) == "1") {
+                                                       p.type_reference.array_rank = 1;
+                                                       p.type_reference.is_out = false;
+                                               }
+                                       } else if (nv[0] == "is_out") {
+                                               if (eval (nv[1]) == "1") {
+                                                       p.type_reference.is_out = true;
+                                               }
                                        }
                                }
                        }