[vala/0.8] Fix code generation for destroy_notify calls for delegate targets
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.8] Fix code generation for destroy_notify calls for delegate targets
- Date: Wed, 21 Apr 2010 13:13:56 +0000 (UTC)
commit 326b8d52e4a0fba56d8374d8608c04867e12e8ab
Author: Ali Sabil <ali sabil gmail com>
Date: Sun Apr 11 14:59:45 2010 +0200
Fix code generation for destroy_notify calls for delegate targets
Fixes bug 615440.
codegen/valaccodebasemodule.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 91b14e3..d76aefc 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -2855,10 +2855,14 @@ internal class Vala.CCodeBaseModule : CCodeModule {
var ccall = new CCodeFunctionCall (delegate_target_destroy_notify);
ccall.add_argument (delegate_target);
+ var destroy_call = new CCodeCommaExpression ();
+ destroy_call.append_expression (ccall);
+ destroy_call.append_expression (new CCodeConstant ("NULL"));
+
var cisnull = new CCodeBinaryExpression (CCodeBinaryOperator.EQUALITY, delegate_target_destroy_notify, new CCodeConstant ("NULL"));
var ccomma = new CCodeCommaExpression ();
- ccomma.append_expression (new CCodeConditionalExpression (cisnull, new CCodeConstant ("NULL"), ccall));
+ ccomma.append_expression (new CCodeConditionalExpression (cisnull, new CCodeConstant ("NULL"), destroy_call));
ccomma.append_expression (new CCodeAssignment (cvar, new CCodeConstant ("NULL")));
ccomma.append_expression (new CCodeAssignment (delegate_target, new CCodeConstant ("NULL")));
ccomma.append_expression (new CCodeAssignment (delegate_target_destroy_notify, new CCodeConstant ("NULL")));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]