]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
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 fa9802e3ccc461a90d695e53e9287d535a5604a7..9170bdac55e0ed2e3e64acc5c6dea7989a7b2f0f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index 251ba6f17b6b00eed89b86dd36bbf226a83c0665..31ce76edd0faf5a2c75100d017e901bbb80ea198 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;
+                                               }
                                        }
                                }
                        }