From: Luca Bruno Date: Wed, 4 May 2011 20:16:58 +0000 (+0200) Subject: GError: Use destroy_value in return_with_exception X-Git-Tag: 0.13.0~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8596e898a5734da4edcc7a6feff4a89b6f3784d7;p=thirdparty%2Fvala.git GError: Use destroy_value in return_with_exception --- diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala index 848363614..bcc4f6d05 100644 --- a/codegen/valagerrormodule.vala +++ b/codegen/valagerrormodule.vala @@ -104,8 +104,7 @@ public class Vala.GErrorModule : CCodeDelegateModule { if (current_method is CreationMethod && current_method.parent_symbol is Class) { var cl = (Class) current_method.parent_symbol; - var unref_call = get_unref_expression (new CCodeIdentifier ("self"), new ObjectType (cl), null); - ccode.add_expression (unref_call); + ccode.add_expression (destroy_value (new GLibValue (new ObjectType (cl), new CCodeIdentifier ("self")))); ccode.add_return (new CCodeConstant ("NULL")); } else if (is_in_coroutine ()) { ccode.add_return (new CCodeConstant ("FALSE"));