[vala/staging] codegen: Call ref_sink on objects passed to generic type



commit 8c9f486a05d7d095e23d4209ec6801d398bc91fe
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Jul 30 12:11:06 2018 +0200

    codegen: Call ref_sink on objects passed to generic type
    
    Regression of 6f1d0947bed9260436e7d2da18977b3925cdb0bd
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/655

 codegen/valaccodebasemodule.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 657d7ddbb..14886a3cc 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -5847,7 +5847,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                var result = ((GLibValue) value).copy ();
 
                if (type.value_owned
-                   && target_type is ObjectType && !target_type.floating_reference
+                   && (target_type is GenericType || (target_type is ObjectType && 
!target_type.floating_reference))
                    && type.floating_reference) {
                        /* floating reference, sink it.
                         */


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