[vala/0.44] codegen: Preserve full access to delegate variables and its target/destroy cvalues



commit dfb88742fd30f6668195a866bdfc401fd1a49ab1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Oct 2 23:23:12 2019 +0200

    codegen: Preserve full access to delegate variables and its target/destroy cvalues
    
    Don't unconditionally set delegate_target_destroy_notify_cvalue to NULL for any
    variable access.

 codegen/valaccodememberaccessmodule.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 5ef5f4eb9..1f72c1f0e 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -735,9 +735,9 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                } else if (delegate_type != null) {
                        if (!get_ccode_delegate_target (variable)) {
                                result.delegate_target_cvalue = new CCodeConstant ("NULL");
+                               result.delegate_target_destroy_notify_cvalue = new CCodeConstant ("NULL");
                        }
 
-                       result.delegate_target_destroy_notify_cvalue = new CCodeConstant ("NULL");
                        result.lvalue = false;
                }
                result.value_type.value_owned = false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]