[vala/wip/transform: 71/107] dbus: Copy type when declaring temporary	variables
- From: Rico Tzschichholz <ricotz src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [vala/wip/transform: 71/107] dbus: Copy type when declaring temporary	variables
 
- Date: Mon,  7 Jan 2019 09:54:41 +0000 (UTC)
 
commit 7724f21fdace0bf97eda75e4b65a58c4aab9f497
Author: Luca Bruno <lucabru src gnome org>
Date:   Fri Oct 26 13:46:42 2012 +0200
    dbus: Copy type when declaring temporary variables
    
    If type is not copied, then the semantic analyzer will modify the
    original type.
 codegen/valagdbusservertransformer.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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);
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]