fix methods with ref array parameters, based on patch by Hans Vercammen,
authorJuerg Billeter <j@bitron.ch>
Fri, 18 Jan 2008 15:52:46 +0000 (15:52 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Fri, 18 Jan 2008 15:52:46 +0000 (15:52 +0000)
2008-01-18  Juerg Billeter  <j@bitron.ch>

* gobject/valaccodegeneratormethod.vala: fix methods with ref array
  parameters, based on patch by Hans Vercammen, fixes bug 510418

svn path=/trunk/; revision=850

ChangeLog
gobject/valaccodegeneratormethod.vala

index fa24d59..cef312d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-01-18  Jürg Billeter  <j@bitron.ch>
 
+       * gobject/valaccodegeneratormethod.vala: fix methods with ref array
+         parameters, based on patch by Hans Vercammen, fixes bug 510418
+
+2008-01-18  Jürg Billeter  <j@bitron.ch>
+
        * vapi/glib-2.0.vapi: fix GOptionFlags binding
 
 2008-01-17  Jürg Billeter  <j@bitron.ch>
index 7cab51b..2bb2246 100644 (file)
@@ -180,7 +180,7 @@ public class Vala.CCodeGenerator {
                                var arr = (Array) param.type_reference.data_type;
                                
                                var length_ctype = "int";
-                               if (param.type_reference.is_out) {
+                               if (param.type_reference.is_out || param.type_reference.is_ref) {
                                        length_ctype = "int*";
                                }
                                
@@ -466,7 +466,7 @@ public class Vala.CCodeGenerator {
                                        var arr = (Array) param.type_reference.data_type;
                                        
                                        var length_ctype = "int";
-                                       if (param.type_reference.is_out) {
+                                       if (param.type_reference.is_out || param.type_reference.is_ref) {
                                                length_ctype = "int*";
                                        }