From: Luca Bruno Date: Fri, 26 Oct 2012 11:46:42 +0000 (+0200) Subject: dbus: Copy type when declaring temporary variables X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eca31de51d29dcd4874f1507be4430c1a227bfb4;p=thirdparty%2Fvala.git dbus: Copy type when declaring temporary variables If type is not copied, then the semantic analyzer will modify the original type. --- diff --git a/codegen/valagdbusservertransformer.vala b/codegen/valagdbusservertransformer.vala index 3dccdbfe3..418f955e0 100644 --- a/codegen/valagdbusservertransformer.vala +++ b/codegen/valagdbusservertransformer.vala @@ -106,7 +106,7 @@ public class Vala.GDBusServerTransformer : GDBusClientTransformer { b.open_try (); string result = null; if (m.has_result) { - result = b.add_temp_declaration (m.return_type); + result = b.add_temp_declaration (copy_type (m.return_type)); b.add_assignment (expression (result), finish_call); } else { b.add_expression (finish_call);