[vala] GError: Use destroy_value in return_with_exception
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] GError: Use destroy_value in return_with_exception
- Date: Wed, 4 May 2011 20:24:00 +0000 (UTC)
commit 8596e898a5734da4edcc7a6feff4a89b6f3784d7
Author: Luca Bruno <lucabru src gnome org>
Date: Wed May 4 22:16:58 2011 +0200
GError: Use destroy_value in return_with_exception
codegen/valagerrormodule.vala | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valagerrormodule.vala b/codegen/valagerrormodule.vala
index 8483636..bcc4f6d 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"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]