[vala] codegen: Fix lambda expressions passed to GClosure parameters
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Fix lambda expressions passed to GClosure parameters
- Date: Thu, 21 Oct 2010 20:10:37 +0000 (UTC)
commit ce41bb98218a7f6cfc7c1a567bc30d3c5cb649d9
Author: Jürg Billeter <j bitron ch>
Date: Thu Oct 21 22:06:40 2010 +0200
codegen: Fix lambda expressions passed to GClosure parameters
codegen/valaccodebasemodule.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index abebbcf..267a6f4 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5006,6 +5006,8 @@ public class Vala.CCodeBaseModule : CodeGenerator {
ref_call.add_argument (delegate_target);
delegate_target = ref_call;
set_delegate_target_destroy_notify (lambda, new CCodeIdentifier ("block%d_data_unref".printf (block_id)));
+ } else {
+ set_delegate_target_destroy_notify (lambda, new CCodeConstant ("NULL"));
}
set_delegate_target (lambda, delegate_target);
} else if (get_this_type () != null || in_constructor) {
@@ -5023,10 +5025,13 @@ public class Vala.CCodeBaseModule : CodeGenerator {
delegate_target = ref_call;
set_delegate_target_destroy_notify (lambda, new CCodeIdentifier ("g_object_unref"));
}
+ } else {
+ set_delegate_target_destroy_notify (lambda, new CCodeConstant ("NULL"));
}
set_delegate_target (lambda, delegate_target);
} else {
set_delegate_target (lambda, new CCodeConstant ("NULL"));
+ set_delegate_target_destroy_notify (lambda, new CCodeConstant ("NULL"));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]