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



commit 763ec146b385199bd0cdd66d6719d0713914a1a9
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 6d90ba217..8dc6826dc 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -746,9 +746,9 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                } else if (delegate_type != null) {
                        if (!delegate_type.delegate_symbol.has_target || !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]