[vala] GObject: Use destroy_value in add_get_property_function



commit 6cc35c3d4b025535bac8b4e3a27084c8288b8e3a
Author: Luca Bruno <lucabru src gnome org>
Date:   Wed May 4 22:33:26 2011 +0200

    GObject: Use destroy_value in add_get_property_function

 codegen/valagobjectmodule.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index 1edb80f..0778e37 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -236,7 +236,7 @@ public class Vala.GObjectModule : GTypeModule {
 				ccode.add_expression (csetcall);
 
 				if (requires_destroy (prop.get_accessor.value_type)) {
-					ccode.add_expression (get_unref_expression (new CCodeIdentifier (boxed), prop.get_accessor.value_type, null));
+					ccode.add_expression (destroy_value (new GLibValue (prop.get_accessor.value_type, new CCodeIdentifier (boxed))));
 				}
 			} else {
 				ccall = new CCodeFunctionCall (new CCodeIdentifier (base_prop.get_accessor.get_cname ()));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]