]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix error messages for unsupported signal parameters
authorJürg Billeter <j@bitron.ch>
Tue, 20 Oct 2009 16:38:49 +0000 (18:38 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 20 Oct 2009 16:38:49 +0000 (18:38 +0200)
Fixes bug 598865.

vala/valastruct.vala

index 971d0e36877c1b5404211a02afbf9529f57331ef..49177f240b060723f42e4430557e7253b526f694 100644 (file)
@@ -532,6 +532,9 @@ public class Vala.Struct : TypeSymbol {
                        }
                        if (is_simple_type ()) {
                                Report.error (source_reference, "The type `%s` doesn't declare a marshaller type name".printf (get_full_name ()));
+                               // set marshaller_type_name to avoid multiple errors
+                               marshaller_type_name = "";
+                               return "";
                        } else if (has_type_id) {
                                return "BOXED";
                        } else {
@@ -555,7 +558,9 @@ public class Vala.Struct : TypeSymbol {
                        }
                        if (is_simple_type ()) {
                                Report.error (source_reference, "The value type `%s` doesn't declare a GValue get function".printf (get_full_name ()));
-                               return null;
+                               // set get_value_function to avoid multiple errors
+                               get_value_function = "";
+                               return "";
                        } else if (has_type_id) {
                                return "g_value_get_boxed";
                        } else {
@@ -576,7 +581,9 @@ public class Vala.Struct : TypeSymbol {
                        }
                        if (is_simple_type ()) {
                                Report.error (source_reference, "The value type `%s` doesn't declare a GValue set function".printf (get_full_name ()));
-                               return null;
+                               // set set_value_function to avoid multiple errors
+                               set_value_function = "";
+                               return "";
                        } else if (has_type_id) {
                                return "g_value_set_boxed";
                        } else {