]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix crash when using arrays in D-Bus services, fixes bug 530455
authorJuerg Billeter <j@bitron.ch>
Fri, 2 May 2008 20:58:58 +0000 (20:58 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Fri, 2 May 2008 20:58:58 +0000 (20:58 +0000)
2008-05-02  Juerg Billeter  <j@bitron.ch>

* vala/valaarraytype.vala:
* vala/valadatatype.vala:
* gobject/valaccodegeneratorsignal.vala:

Fix crash when using arrays in D-Bus services, fixes bug 530455

svn path=/trunk/; revision=1336

ChangeLog
gobject/valaccodegeneratorsignal.vala
vala/valaarraytype.vala
vala/valadatatype.vala

index 5f0848eb32f2cedceb006bc6dca8a5a30207487e..27e3a0e003ad21d8916549922e1a4edc35e2aac3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-02  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valaarraytype.vala:
+       * vala/valadatatype.vala:
+       * gobject/valaccodegeneratorsignal.vala:
+
+       Fix crash when using arrays in D-Bus services, fixes bug 530455
+
 2008-05-02  Jürg Billeter  <j@bitron.ch>
 
        * vala/valainitializerlist.vala: implement replace_expression
index e907412aa19dfeacf1ca1d7798b70ffbcec5bf9f..23ce5a205959df84ed320f9ea6e0ddcd3eab2084 100644 (file)
@@ -29,6 +29,8 @@ public class Vala.CCodeGenerator {
                        return ("POINTER");
                } else if (t is ErrorType) {
                        return ("POINTER");
+               } else if (t is ArrayType) {
+                       return ("POINTER");
                } else if (t is VoidType) {
                        return ("VOID");
                } else {
index d7d89a2f9bd05955fe8a25a6b7657588f800c237..925271abae3962fb6ad4450096f1cf35162ff254 100644 (file)
@@ -169,4 +169,14 @@ public class Vala.ArrayType : ReferenceType {
        public override bool is_reference_type_or_type_parameter () {
                return true;
        }
+
+       public override string? get_type_signature () {
+               string element_type_signature = element_type.get_type_signature ();
+
+               if (element_type_signature == null) {
+                       return null;
+               }
+
+               return "a" + element_type_signature;
+       }
 }
index b2f7a85af202033c1927621cf1fbe8f7a019641a..21ea527deeafd99eb4a7d4991bf6320de232446a 100644 (file)
@@ -419,7 +419,7 @@ public abstract class Vala.DataType : CodeNode {
        /**
         * Returns type signature as used for GVariant and D-Bus.
         */
-       public string? get_type_signature () {
+       public virtual string? get_type_signature () {
                if (data_type != null) {
                        return data_type.get_type_signature ();
                } else {