Fix string return type for marshallers, patch by Yu Feng, fixes bug 531137
authorJuerg Billeter <j@bitron.ch>
Thu, 8 May 2008 21:02:22 +0000 (21:02 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Thu, 8 May 2008 21:02:22 +0000 (21:02 +0000)
2008-05-08  Juerg Billeter  <j@bitron.ch>

* gobject/valaccodegeneratorsignal.vala:

Fix string return type for marshallers,
patch by Yu Feng, fixes bug 531137

svn path=/trunk/; revision=1348

ChangeLog
gobject/valaccodegeneratorsignal.vala

index 72791dc..8c3cc07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-05-08  Jürg Billeter  <j@bitron.ch>
 
+       * gobject/valaccodegeneratorsignal.vala:
+
+       Fix string return type for marshallers,
+       patch by Yu Feng, fixes bug 531137
+
+2008-05-08  Jürg Billeter  <j@bitron.ch>
+
        * gobject/valaccodeclassbinding.vala:
 
        Support properties in D-Bus services,
index 23ce5a2..f193f26 100644 (file)
@@ -251,10 +251,10 @@ public class Vala.CCodeGenerator {
                                set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_set_pointer"));
                        } else if (return_type is ErrorType) {
                                set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_set_pointer"));
-                       } else if (return_type.data_type is Class || return_type.data_type is Interface) {
-                               set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_take_object"));
                        } else if (return_type.data_type == string_type.data_type) {
                                set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_take_string"));
+                       } else if (return_type.data_type is Class || return_type.data_type is Interface) {
+                               set_fc = new CCodeFunctionCall (new CCodeIdentifier ("g_value_take_object"));
                        } else {
                                set_fc = new CCodeFunctionCall (new CCodeIdentifier (return_type.data_type.get_set_value_function ()));
                        }