[vala/0.34] codegen: Don't add target fields for captured delegates without target
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.34] codegen: Don't add target fields for captured delegates without target
- Date: Mon, 16 Apr 2018 20:01:01 +0000 (UTC)
commit 03fde0a012ea62dd9008e17b984f511242bc06d0
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Mar 19 10:53:52 2018 +0100
codegen: Don't add target fields for captured delegates without target
codegen/valaccodebasemodule.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index cbdafca..27f295b 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -1935,7 +1935,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
data.add_field ("gint", get_array_length_cname
(get_local_cname (local), dim));
}
data.add_field ("gint", get_array_size_cname (get_local_cname
(local)));
- } else if (local.variable_type is DelegateType) {
+ } else if (local.variable_type is DelegateType && ((DelegateType)
local.variable_type).delegate_symbol.has_target) {
data.add_field ("gpointer", get_delegate_target_cname
(get_local_cname (local)));
if (local.variable_type.value_owned) {
data.add_field ("GDestroyNotify",
get_delegate_target_destroy_notify_cname (get_local_cname (local)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]